Autogenerated HTML docs for v1.7.3.2-343-g7d43d
diff --git a/RelNotes/1.7.4.txt b/RelNotes/1.7.4.txt index 05e8a43..9f946e2 100644 --- a/RelNotes/1.7.4.txt +++ b/RelNotes/1.7.4.txt
@@ -15,9 +15,18 @@ /etc/gitattributes; core.attributesfile configuration variable can be used to customize the path to this file. + * Bash completion script in contrib/ has been adjusted to be also + usable by zsh. + + * "git daemon" can take more than one --listen option to listen to + multiple addresses. + * "git diff" and "git grep" learned how functions and subroutines in Fortran look like. + * "git mergetool" tells vim/gvim to show three-way diff by default + (use vimdiff2/gvimdiff2 as the tool name for old behaviour). + * "git log -G<pattern>" limits the output to commits whose change has added or deleted lines that match the given pattern. @@ -25,13 +34,36 @@ deprecated; we might want to remove it in the future. Users can use the new --empty option to be more explicit instead. + * "git repack -f" does not spend cycles to recompress objects in the + non-delta representation anymore (use -F if you really mean it when + e.g. you changed the compression level). + * "git merge --log" used to limit the resulting merge log to 20 entries; this is now customizable by giving e.g. "--log=47". + * The default "recursive" merge strategy learned --rename-threshold + option to influence the rename detection, similar to the -M option + of "git diff". E.g. "git merge -Xrename-threshold=50% ..." to use + this. + + * The "recursive" strategy also learned to ignore various whitespace + changes; the most notable is -Xignore-space-at-eol. + + * "git send-email" learned "--to-cmd", similar to "--cc-cmd", to read + recipient list from a command output. + + * "git send-email" learned to read and use "To:" from its input files. + * you can extend "git shell", which is often used on boxes that allow git-only login over ssh as login shell, with custom set of commands. + * "git submodule sync" updates metainformation for all submodules, + not just the ones that have been checked out. + + * gitweb can use custom 'highlight' command with its configuration file. + + Also contains various documentation updates. @@ -41,14 +73,33 @@ All of the fixes in v1.7.3.X maintenance series are included in this release, unless otherwise noted. + * "diff" and friends incorrectly applied textconv filters to symlinks + (d391c0ff). + + * "git apply" segfaulted when a bogus input is fed to it (24305cd70). + + * Running "git cherry-pick --ff" on a root commit segfaulted (6355e50). + * "git log --author=me --author=her" did not find commits written by me or by her; instead it looked for commits written by me and by her, which is impossible. + * "git merge-file" can be called from within a subdirectory now + (55846b9a). + + * "git push --progress" shows progress indicators now. + + * "git repack" places its temporary packs under $GIT_OBJECT_DIRECTORY/pack + instead of $GIT_OBJECT_DIRECTORY/ to avoid cross directory renames. + + * "git rev-list --format="...%x00..." incorrectly chopped its output + at NUL (9130ac9fe). + + * "git submodule update --recursive --other-flags" passes flags down + to its subinvocations. --- exec >/var/tmp/1 -O=v1.7.3 -O=v1.7.3.1-42-g34289ec +O=v1.7.3.2-245-g03276d9 echo O=$(git describe master) git shortlog --no-merges ^maint ^$O master
diff --git a/config.txt b/config.txt index 538ebb5..6a6c0b5 100644 --- a/config.txt +++ b/config.txt
@@ -601,8 +601,9 @@ this behavior can be chosen per-branch using the `--track` and `--no-track` options. The valid settings are: `false` -- no automatic setup is done; `true` -- automatic setup is done when the - starting point is a remote branch; `always` -- automatic setup is - done when the starting point is either a local branch or remote + starting point is a remote-tracking branch; `always` -- + automatic setup is done when the starting point is either a + local branch or remote-tracking branch. This option defaults to true. branch.autosetuprebase:: @@ -613,7 +614,7 @@ When `local`, rebase is set to true for tracked branches of other local branches. When `remote`, rebase is set to true for tracked branches of - remote branches. + remote-tracking branches. When `always`, rebase will be set to true for all tracking branches. See "branch.autosetupmerge" for details on how to set up a @@ -680,7 +681,7 @@ color.branch.<slot>:: Use customized color for branch coloration. `<slot>` is one of `current` (the current branch), `local` (a local branch), - `remote` (a tracking branch in refs/remotes/), `plain` (other + `remote` (a remote-tracking branch in refs/remotes/), `plain` (other refs). + The value for these configuration variables is a list of colors (at most @@ -708,7 +709,7 @@ color.decorate.<slot>:: Use customized color for 'git log --decorate' output. `<slot>` is one of `branch`, `remoteBranch`, `tag`, `stash` or `HEAD` for local - branches, remote tracking branches, tags, stash and HEAD, respectively. + branches, remote-tracking branches, tags, stash and HEAD, respectively. color.grep:: When set to `always`, always highlight matches. When `false` (or @@ -1102,7 +1103,7 @@ linkgit:git-gui[1]. gui.pruneduringfetch:: - "true" if linkgit:git-gui[1] should prune tracking branches when + "true" if linkgit:git-gui[1] should prune remote-tracking branches when performing a fetch. The default value is "false". gui.trustmtime::
diff --git a/everyday.html b/everyday.html index 94f50d3..b628367 100644 --- a/everyday.html +++ b/everyday.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>Everyday GIT With 20 Commands Or So</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -279,6 +347,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -291,8 +360,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -303,7 +381,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>Everyday GIT With 20 Commands Or So</title> </head> <body> <div id="header"> @@ -311,23 +388,23 @@ </div> <div id="preamble"> <div class="sectionbody"> -<div class="para"><p><a href="#Individual Developer (Standalone)">[Individual Developer (Standalone)]</a> commands are essential for +<div class="paragraph"><p><a href="#Individual Developer (Standalone)">[Individual Developer (Standalone)]</a> commands are essential for anybody who makes a commit, even for somebody who works alone.</p></div> -<div class="para"><p>If you work with other people, you will need commands listed in +<div class="paragraph"><p>If you work with other people, you will need commands listed in the <a href="#Individual Developer (Participant)">[Individual Developer (Participant)]</a> section as well.</p></div> -<div class="para"><p>People who play the <a href="#Integrator">[Integrator]</a> role need to learn some more +<div class="paragraph"><p>People who play the <a href="#Integrator">[Integrator]</a> role need to learn some more commands in addition to the above.</p></div> -<div class="para"><p><a href="#Repository Administration">[Repository Administration]</a> commands are for system +<div class="paragraph"><p><a href="#Repository Administration">[Repository Administration]</a> commands are for system administrators who are responsible for the care and feeding of git repositories.</p></div> </div> </div> <h2 id="_individual_developer_standalone_a_id_individual_developer_standalone_a">Individual Developer (Standalone)<a id="Individual Developer (Standalone)"></a></h2> <div class="sectionbody"> -<div class="para"><p>A standalone individual developer does not exchange patches with +<div class="paragraph"><p>A standalone individual developer does not exchange patches with other people, and works alone in a single repository, using the following commands.</p></div> -<div class="ilist"><ul> +<div class="ulist"><ul> <li> <p> <a href="git-init.html">git-init(1)</a> to create a new repository. @@ -388,8 +465,8 @@ </li> </ul></div> <h3 id="_examples">Examples</h3><div style="clear:left"></div> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> Use a tarball as a starting point for a new repository. </dt> <dd> @@ -398,11 +475,11 @@ <pre><tt>$ tar zxf frotz.tar.gz $ cd frotz $ git init -$ git add . <b>(1)</b> +$ git add . <b><1></b> $ git commit -m "import of frotz source tree." -$ git tag v2.43 <b>(2)</b></tt></pre> +$ git tag v2.43 <b><2></b></tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> add everything under the current directory. @@ -415,30 +492,30 @@ </li> </ol></div> </dd> -<dt> +<dt class="hdlist1"> Create a topic branch and develop. </dt> <dd> <div class="listingblock"> <div class="content"> -<pre><tt>$ git checkout -b alsa-audio <b>(1)</b> +<pre><tt>$ git checkout -b alsa-audio <b><1></b> $ edit/compile/test -$ git checkout -- curses/ux_audio_oss.c <b>(2)</b> -$ git add curses/ux_audio_alsa.c <b>(3)</b> +$ git checkout -- curses/ux_audio_oss.c <b><2></b> +$ git add curses/ux_audio_alsa.c <b><3></b> $ edit/compile/test -$ git diff HEAD <b>(4)</b> -$ git commit -a -s <b>(5)</b> +$ git diff HEAD <b><4></b> +$ git commit -a -s <b><5></b> $ edit/compile/test -$ git reset --soft HEAD^ <b>(6)</b> +$ git reset --soft HEAD^ <b><6></b> $ edit/compile/test -$ git diff ORIG_HEAD <b>(7)</b> -$ git commit -a -c ORIG_HEAD <b>(8)</b> -$ git checkout master <b>(9)</b> -$ git merge alsa-audio <b>(10)</b> -$ git log --since='3 days ago' <b>(11)</b> -$ git log v2.43.. curses/ <b>(12)</b></tt></pre> +$ git diff ORIG_HEAD <b><7></b> +$ git commit -a -c ORIG_HEAD <b><8></b> +$ git checkout master <b><9></b> +$ git merge alsa-audio <b><10></b> +$ git log --since='3 days ago' <b><11></b> +$ git log v2.43.. curses/ <b><12></b></tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> create a new topic branch. @@ -500,7 +577,7 @@ </li> <li> <p> -view only the changes that touch what's in <tt>curses/</tt> +view only the changes that touch what’s in <tt>curses/</tt> directory, since <tt>v2.43</tt> tag. </p> </li> @@ -510,10 +587,10 @@ </div> <h2 id="_individual_developer_participant_a_id_individual_developer_participant_a">Individual Developer (Participant)<a id="Individual Developer (Participant)"></a></h2> <div class="sectionbody"> -<div class="para"><p>A developer working as a participant in a group project needs to +<div class="paragraph"><p>A developer working as a participant in a group project needs to learn how to communicate with others, and uses these commands in addition to the ones needed by a standalone developer.</p></div> -<div class="ilist"><ul> +<div class="ulist"><ul> <li> <p> <a href="git-clone.html">git-clone(1)</a> from the upstream to prime your local @@ -540,8 +617,8 @@ </li> </ul></div> <h3 id="_examples_2">Examples</h3><div style="clear:left"></div> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> Clone the upstream and work on it. Feed changes to upstream. </dt> <dd> @@ -549,16 +626,16 @@ <div class="content"> <pre><tt>$ git clone git://git.kernel.org/pub/scm/.../torvalds/linux-2.6 my2.6 $ cd my2.6 -$ edit/compile/test; git commit -a -s <b>(1)</b> -$ git format-patch origin <b>(2)</b> -$ git pull <b>(3)</b> -$ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <b>(4)</b> -$ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <b>(5)</b> -$ git reset --hard ORIG_HEAD <b>(6)</b> -$ git gc <b>(7)</b> -$ git fetch --tags <b>(8)</b></tt></pre> +$ edit/compile/test; git commit -a -s <b><1></b> +$ git format-patch origin <b><2></b> +$ git pull <b><3></b> +$ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <b><4></b> +$ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <b><5></b> +$ git reset --hard ORIG_HEAD <b><6></b> +$ git gc <b><7></b> +$ git fetch --tags <b><8></b></tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> repeat as needed. @@ -605,29 +682,29 @@ </li> </ol></div> </dd> -<dt> +<dt class="hdlist1"> Push into another repository. </dt> <dd> <div class="listingblock"> <div class="content"> -<pre><tt>satellite$ git clone mothership:frotz frotz <b>(1)</b> +<pre><tt>satellite$ git clone mothership:frotz frotz <b><1></b> satellite$ cd frotz -satellite$ git config --get-regexp '^(remote|branch)\.' <b>(2)</b> +satellite$ git config --get-regexp '^(remote|branch)\.' <b><2></b> remote.origin.url mothership:frotz remote.origin.fetch refs/heads/*:refs/remotes/origin/* branch.master.remote origin branch.master.merge refs/heads/master satellite$ git config remote.origin.push \ - master:refs/remotes/satellite/master <b>(3)</b> + master:refs/remotes/satellite/master <b><3></b> satellite$ edit/compile/test/commit -satellite$ git push origin <b>(4)</b> +satellite$ git push origin <b><4></b> mothership$ cd frotz mothership$ git checkout master -mothership$ git merge satellite/master <b>(5)</b></tt></pre> +mothership$ git merge satellite/master <b><5></b></tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> mothership machine has a frotz repository under your home @@ -639,7 +716,7 @@ <p> clone sets these configuration variables by default. It arranges <tt>git pull</tt> to fetch and store the branches of mothership -machine to local <tt>remotes/origin/*</tt> tracking branches. +machine to local <tt>remotes/origin/*</tt> remote-tracking branches. </p> </li> <li> @@ -651,8 +728,8 @@ <li> <p> push will stash our work away on <tt>remotes/satellite/master</tt> -tracking branch on the mothership machine. You could use this as -a back-up method. +remote-tracking branch on the mothership machine. You could use this +as a back-up method. </p> </li> <li> @@ -663,19 +740,19 @@ </li> </ol></div> </dd> -<dt> +<dt class="hdlist1"> Branch off of a specific tag. </dt> <dd> <div class="listingblock"> <div class="content"> -<pre><tt>$ git checkout -b private2.6.14 v2.6.14 <b>(1)</b> +<pre><tt>$ git checkout -b private2.6.14 v2.6.14 <b><1></b> $ edit/compile/test; git commit -a $ git checkout master $ git format-patch -k -m --stdout v2.6.14..private2.6.14 | - git am -3 -k <b>(2)</b></tt></pre> + git am -3 -k <b><2></b></tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> create a private branch based on a well known (but somewhat behind) @@ -694,11 +771,11 @@ </div> <h2 id="_integrator_a_id_integrator_a">Integrator<a id="Integrator"></a></h2> <div class="sectionbody"> -<div class="para"><p>A fairly central person acting as the integrator in a group +<div class="paragraph"><p>A fairly central person acting as the integrator in a group project receives changes made by others, reviews and integrates them and publishes the result for others to use, using these commands in addition to the ones needed by participants.</p></div> -<div class="ilist"><ul> +<div class="ulist"><ul> <li> <p> <a href="git-am.html">git-am(1)</a> to apply patches e-mailed in from your @@ -728,35 +805,35 @@ </li> </ul></div> <h3 id="_examples_3">Examples</h3><div style="clear:left"></div> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> My typical GIT day. </dt> <dd> <div class="listingblock"> <div class="content"> -<pre><tt>$ git status <b>(1)</b> -$ git show-branch <b>(2)</b> -$ mailx <b>(3)</b> +<pre><tt>$ git status <b><1></b> +$ git show-branch <b><2></b> +$ mailx <b><3></b> & s 2 3 4 5 ./+to-apply & s 7 8 ./+hold-linus & q $ git checkout -b topic/one master -$ git am -3 -i -s -u ./+to-apply <b>(4)</b> +$ git am -3 -i -s -u ./+to-apply <b><4></b> $ compile/test -$ git checkout -b hold/linus && git am -3 -i -s -u ./+hold-linus <b>(5)</b> -$ git checkout topic/one && git rebase master <b>(6)</b> -$ git checkout pu && git reset --hard next <b>(7)</b> -$ git merge topic/one topic/two && git merge hold/linus <b>(8)</b> +$ git checkout -b hold/linus && git am -3 -i -s -u ./+hold-linus <b><5></b> +$ git checkout topic/one && git rebase master <b><6></b> +$ git checkout pu && git reset --hard next <b><7></b> +$ git merge topic/one topic/two && git merge hold/linus <b><8></b> $ git checkout maint -$ git cherry-pick master~4 <b>(9)</b> +$ git cherry-pick master~4 <b><9></b> $ compile/test -$ git tag -s -m "GIT 0.99.9x" v0.99.9x <b>(10)</b> -$ git fetch ko && git show-branch master maint 'tags/ko-*' <b>(11)</b> -$ git push ko <b>(12)</b> -$ git push ko v0.99.9x <b>(13)</b></tt></pre> +$ git tag -s -m "GIT 0.99.9x" v0.99.9x <b><10></b> +$ git fetch ko && git show-branch master maint 'tags/ko-*' <b><11></b> +$ git push ko <b><12></b> +$ git push ko v0.99.9x <b><13></b></tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> see what I was in the middle of doing, if any. @@ -829,7 +906,7 @@ Push: +pu Push: maint</tt></pre> </div></div> -<div class="para"><p>In the output from <tt>git show-branch</tt>, <tt>master</tt> should have +<div class="paragraph"><p>In the output from <tt>git show-branch</tt>, <tt>master</tt> should have everything <tt>ko-master</tt> has, and <tt>next</tt> should have everything <tt>ko-next</tt> has.</p></div> </li> @@ -849,9 +926,9 @@ </div> <h2 id="_repository_administration_a_id_repository_administration_a">Repository Administration<a id="Repository Administration"></a></h2> <div class="sectionbody"> -<div class="para"><p>A repository administrator uses the following tools to set up +<div class="paragraph"><p>A repository administrator uses the following tools to set up and maintain access to the repository by developers.</p></div> -<div class="ilist"><ul> +<div class="ulist"><ul> <li> <p> <a href="git-daemon.html">git-daemon(1)</a> to allow anonymous download from @@ -865,11 +942,11 @@ </p> </li> </ul></div> -<div class="para"><p><a href="howto/update-hook-example.txt">update hook howto</a> has a good +<div class="paragraph"><p><a href="howto/update-hook-example.txt">update hook howto</a> has a good example of managing a shared central repository.</p></div> <h3 id="_examples_4">Examples</h3><div style="clear:left"></div> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> We assume the following in /etc/services </dt> <dd> @@ -879,7 +956,7 @@ git 9418/tcp # Git Version Control System</tt></pre> </div></div> </dd> -<dt> +<dt class="hdlist1"> Run git-daemon to serve /pub/scm from inetd. </dt> <dd> @@ -889,9 +966,9 @@ git stream tcp nowait nobody \ /usr/bin/git-daemon git-daemon --inetd --export-all /pub/scm</tt></pre> </div></div> -<div class="para"><p>The actual configuration line should be on one line.</p></div> +<div class="paragraph"><p>The actual configuration line should be on one line.</p></div> </dd> -<dt> +<dt class="hdlist1"> Run git-daemon to serve /pub/scm from xinetd. </dt> <dd> @@ -913,24 +990,24 @@ log_on_failure += USERID }</tt></pre> </div></div> -<div class="para"><p>Check your xinetd(8) documentation and setup, this is from a Fedora system. +<div class="paragraph"><p>Check your xinetd(8) documentation and setup, this is from a Fedora system. Others might be different.</p></div> </dd> -<dt> +<dt class="hdlist1"> Give push/pull only access to developers. </dt> <dd> <div class="listingblock"> <div class="content"> -<pre><tt>$ grep git /etc/passwd <b>(1)</b> +<pre><tt>$ grep git /etc/passwd <b><1></b> alice:x:1000:1000::/home/alice:/usr/bin/git-shell bob:x:1001:1001::/home/bob:/usr/bin/git-shell cindy:x:1002:1002::/home/cindy:/usr/bin/git-shell david:x:1003:1003::/home/david:/usr/bin/git-shell -$ grep git /etc/shells <b>(2)</b> +$ grep git /etc/shells <b><2></b> /usr/bin/git-shell</tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> log-in shell is set to /usr/bin/git-shell, which does not @@ -946,16 +1023,16 @@ </li> </ol></div> </dd> -<dt> +<dt class="hdlist1"> CVS-style shared repository. </dt> <dd> <div class="listingblock"> <div class="content"> -<pre><tt>$ grep git /etc/group <b>(1)</b> +<pre><tt>$ grep git /etc/group <b><1></b> git:x:9418:alice,bob,cindy,david $ cd /home/devo.git -$ ls -l <b>(2)</b> +$ ls -l <b><2></b> lrwxrwxrwx 1 david git 17 Dec 4 22:40 HEAD -> refs/heads/master drwxrwsr-x 2 david git 4096 Dec 4 22:40 branches -rw-rw-r-- 1 david git 84 Dec 4 22:40 config @@ -966,14 +1043,14 @@ drwxrwsr-x 4 david git 4096 Dec 4 22:40 objects drwxrwsr-x 4 david git 4096 Nov 7 14:58 refs drwxrwsr-x 2 david git 4096 Dec 4 22:40 remotes -$ ls -l hooks/update <b>(3)</b> +$ ls -l hooks/update <b><3></b> -r-xr-xr-x 1 david git 3536 Dec 4 22:40 update -$ cat info/allowed-users <b>(4)</b> +$ cat info/allowed-users <b><4></b> refs/heads/master alice\|cindy refs/heads/doc-update bob refs/tags/v[0-9]* david</tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> place the developers into the same git group. @@ -999,17 +1076,17 @@ </li> </ol></div> </dd> -<dt> +<dt class="hdlist1"> HTTP server to support dumb protocol transfer. </dt> <dd> <div class="listingblock"> <div class="content"> -<pre><tt>dev$ git update-server-info <b>(1)</b> -dev$ ftp user@isp.example.com <b>(2)</b> +<pre><tt>dev$ git update-server-info <b><1></b> +dev$ ftp user@isp.example.com <b><2></b> ftp> cp -r .git /home/user/myproject.git</tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> make sure your info/refs and objects/info/packs are up-to-date @@ -1026,7 +1103,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:57:07 UTC +Last updated 2010-11-25 03:13:39 UTC </div> </div> </body>
diff --git a/everyday.txt b/everyday.txt index e0ba8cc..ae413e5 100644 --- a/everyday.txt +++ b/everyday.txt
@@ -180,12 +180,12 @@ machine. <2> clone sets these configuration variables by default. It arranges `git pull` to fetch and store the branches of mothership -machine to local `remotes/origin/*` tracking branches. +machine to local `remotes/origin/*` remote-tracking branches. <3> arrange `git push` to push local `master` branch to `remotes/satellite/master` branch of the mothership machine. <4> push will stash our work away on `remotes/satellite/master` -tracking branch on the mothership machine. You could use this as -a back-up method. +remote-tracking branch on the mothership machine. You could use this +as a back-up method. <5> on mothership machine, merge the work done on the satellite machine into the master branch.
diff --git a/fetch-options.txt b/fetch-options.txt index 5ce1e72..678675c 100644 --- a/fetch-options.txt +++ b/fetch-options.txt
@@ -36,7 +36,7 @@ -p:: --prune:: - After fetching, remove any remote tracking branches which + After fetching, remove any remote-tracking branches which no longer exist on the remote. endif::git-pull[]
diff --git a/git-add.html b/git-add.html index 32ec0ef..685b5c9 100644 --- a/git-add.html +++ b/git-add.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>git-add(1)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -271,7 +339,24 @@ margin-left: 6em; font-size: 0.9em; } -include1::./stylesheets/xhtml11-manpage.css[] +/* Overrides for manpage documents */ +h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +h2 { + border-style: none; +} +div.sectionbody { + margin-left: 5%; +} + +@media print { + div#toc { display: none; } +} + /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { @@ -280,6 +365,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -292,8 +378,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -304,7 +399,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>git-add(1)</title> </head> <body> <div id="header"> @@ -318,46 +412,48 @@ </p> </div> </div> -<h2>SYNOPSIS</h2> +<h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> <div class="verseblock"> -<div class="content"><em>git add</em> [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p] +<div class="verseblock-content"><em>git add</em> [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p] [--edit | -e] [--all | [--update | -u]] [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--] - [<filepattern>…]</div></div> + [<filepattern>…]</div> +<div class="verseblock-attribution"> +</div></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="para"><p>This command updates the index using the current content found in +<div class="paragraph"><p>This command updates the index using the current content found in the working tree, to prepare the content staged for the next commit. It typically adds the current content of existing paths as a whole, but with some options it can also be used to add content with only part of the changes made to the working tree files applied, or remove paths that do not exist in the working tree anymore.</p></div> -<div class="para"><p>The "index" holds a snapshot of the content of the working tree, and it +<div class="paragraph"><p>The "index" holds a snapshot of the content of the working tree, and it is this snapshot that is taken as the contents of the next commit. Thus after making any changes to the working directory, and before running the commit command, you must use the <tt>add</tt> command to add any new or modified files to the index.</p></div> -<div class="para"><p>This command can be performed multiple times before a commit. It only +<div class="paragraph"><p>This command can be performed multiple times before a commit. It only adds the content of the specified file(s) at the time the add command is run; if you want subsequent changes included in the next commit, then you must run <tt>git add</tt> again to add the new content to the index.</p></div> -<div class="para"><p>The <tt>git status</tt> command can be used to obtain a summary of which +<div class="paragraph"><p>The <tt>git status</tt> command can be used to obtain a summary of which files have changes that are staged for the next commit.</p></div> -<div class="para"><p>The <tt>git add</tt> command will not add ignored files by default. If any +<div class="paragraph"><p>The <tt>git add</tt> command will not add ignored files by default. If any ignored files were explicitly specified on the command line, <tt>git add</tt> will fail with a list of ignored files. Ignored files reached by directory recursion or filename globbing performed by Git (quote your globs before the shell) will be silently ignored. The <em>git add</em> command can be used to add ignored files with the <tt>-f</tt> (force) option.</p></div> -<div class="para"><p>Please see <a href="git-commit.html">git-commit(1)</a> for alternative ways to add content to a +<div class="paragraph"><p>Please see <a href="git-commit.html">git-commit(1)</a> for alternative ways to add content to a commit.</p></div> </div> <h2 id="_options">OPTIONS</h2> <div class="sectionbody"> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> <filepattern>… </dt> <dd> @@ -369,22 +465,22 @@ directory, recursively. </p> </dd> -<dt> +<dt class="hdlist1"> -n </dt> -<dt> +<dt class="hdlist1"> --dry-run </dt> <dd> <p> - Don't actually add the file(s), just show if they exist and/or will + Don’t actually add the file(s), just show if they exist and/or will be ignored. </p> </dd> -<dt> +<dt class="hdlist1"> -v </dt> -<dt> +<dt class="hdlist1"> --verbose </dt> <dd> @@ -392,10 +488,10 @@ Be verbose. </p> </dd> -<dt> +<dt class="hdlist1"> -f </dt> -<dt> +<dt class="hdlist1"> --force </dt> <dd> @@ -403,10 +499,10 @@ Allow adding otherwise ignored files. </p> </dd> -<dt> +<dt class="hdlist1"> -i </dt> -<dt> +<dt class="hdlist1"> --interactive </dt> <dd> @@ -417,10 +513,10 @@ mode” for details. </p> </dd> -<dt> +<dt class="hdlist1"> -p </dt> -<dt> +<dt class="hdlist1"> --patch </dt> <dd> @@ -430,11 +526,11 @@ to review the difference before adding modified contents to the index. </p> -<div class="para"><p>This effectively runs <tt>add --interactive</tt>, but bypasses the +<div class="paragraph"><p>This effectively runs <tt>add --interactive</tt>, but bypasses the initial command menu and directly jumps to the <tt>patch</tt> subcommand. See “Interactive mode” for details.</p></div> </dd> -<dt> +<dt class="hdlist1"> -e, --edit </dt> <dd> @@ -443,14 +539,16 @@ edit it. After the editor was closed, adjust the hunk headers and apply the patch to the index. </p> -<div class="para"><p><strong>NOTE</strong>: Obviously, if you change anything else than the first character -on lines beginning with a space or a minus, the patch will no longer -apply.</p></div> +<div class="paragraph"><p>The intent of this option is to pick and choose lines of the patch to +apply, or even to modify the contents of lines to be staged. This can be +quicker and more flexible than using the interactive hunk selector. +However, it is easy to confuse oneself and create a patch that does not +apply to the index. See EDITING PATCHES below.</p></div> </dd> -<dt> +<dt class="hdlist1"> -u </dt> -<dt> +<dt class="hdlist1"> --update </dt> <dd> @@ -462,14 +560,14 @@ from the index if the corresponding files in the working tree have been removed. </p> -<div class="para"><p>If no <filepattern> is given, default to "."; in other words, +<div class="paragraph"><p>If no <filepattern> is given, default to "."; in other words, update all tracked files in the current directory and its subdirectories.</p></div> </dd> -<dt> +<dt class="hdlist1"> -A </dt> -<dt> +<dt class="hdlist1"> --all </dt> <dd> @@ -480,10 +578,10 @@ removing files that are no longer in the working tree. </p> </dd> -<dt> +<dt class="hdlist1"> -N </dt> -<dt> +<dt class="hdlist1"> --intent-to-add </dt> <dd> @@ -495,16 +593,16 @@ -a</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> --refresh </dt> <dd> <p> - Don't add the file(s), but only refresh their stat() + Don’t add the file(s), but only refresh their stat() information in the index. </p> </dd> -<dt> +<dt class="hdlist1"> --ignore-errors </dt> <dd> @@ -514,7 +612,7 @@ others. The command shall still exit with non-zero status. </p> </dd> -<dt> +<dt class="hdlist1"> --ignore-missing </dt> <dd> @@ -525,7 +623,7 @@ tree or not. </p> </dd> -<dt> +<dt class="hdlist1"> -- </dt> <dd> @@ -539,14 +637,14 @@ </div> <h2 id="_configuration">Configuration</h2> <div class="sectionbody"> -<div class="para"><p>The optional configuration variable <tt>core.excludesfile</tt> indicates a path to a +<div class="paragraph"><p>The optional configuration variable <tt>core.excludesfile</tt> indicates a path to a file containing patterns of file names to exclude from git-add, similar to $GIT_DIR/info/exclude. Patterns in the exclude file are used in addition to those in info/exclude. See <a href="gitrepository-layout.html">gitrepository-layout(5)</a>.</p></div> </div> <h2 id="_examples">EXAMPLES</h2> <div class="sectionbody"> -<div class="ilist"><ul> +<div class="ulist"><ul> <li> <p> Adds content from all <tt>*.txt</tt> files under <tt>Documentation</tt> directory @@ -556,7 +654,7 @@ <div class="content"> <pre><tt>$ git add Documentation/\*.txt</tt></pre> </div></div> -<div class="para"><p>Note that the asterisk <tt>*</tt> is quoted from the shell in this +<div class="paragraph"><p>Note that the asterisk <tt>*</tt> is quoted from the shell in this example; this lets the command include the files from subdirectories of <tt>Documentation/</tt> directory.</p></div> </li> @@ -568,7 +666,7 @@ <div class="content"> <pre><tt>$ git add git-*.sh</tt></pre> </div></div> -<div class="para"><p>Because this example lets the shell expand the asterisk (i.e. you are +<div class="paragraph"><p>Because this example lets the shell expand the asterisk (i.e. you are listing the files explicitly), it does not consider <tt>subdir/git-foo.sh</tt>.</p></div> </li> @@ -576,10 +674,10 @@ </div> <h2 id="_interactive_mode">Interactive mode</h2> <div class="sectionbody"> -<div class="para"><p>When the command enters the interactive mode, it shows the +<div class="paragraph"><p>When the command enters the interactive mode, it shows the output of the <em>status</em> subcommand, and then goes into its interactive command loop.</p></div> -<div class="para"><p>The command loop shows the list of subcommands available, and +<div class="paragraph"><p>The command loop shows the list of subcommands available, and gives a prompt "What now> ". In general, when the prompt ends with a single <em>></em>, you can pick only one of the choices given and type return, like this:</p></div> @@ -590,11 +688,11 @@ 5: patch 6: diff 7: quit 8: help What now> 1</tt></pre> </div></div> -<div class="para"><p>You also could say <tt>s</tt> or <tt>sta</tt> or <tt>status</tt> above as long as the +<div class="paragraph"><p>You also could say <tt>s</tt> or <tt>sta</tt> or <tt>status</tt> above as long as the choice is unique.</p></div> -<div class="para"><p>The main command loop has 6 subcommands (plus help and quit).</p></div> -<div class="vlist"><dl> -<dt> +<div class="paragraph"><p>The main command loop has 6 subcommands (plus help and quit).</p></div> +<div class="dlist"><dl> +<dt class="hdlist1"> status </dt> <dd> @@ -611,7 +709,7 @@ 1: binary nothing foo.png 2: +403/-35 +1/-1 git-add--interactive.perl</tt></pre> </div></div> -<div class="para"><p>It shows that foo.png has differences from HEAD (but that is +<div class="paragraph"><p>It shows that foo.png has differences from HEAD (but that is binary so line count cannot be shown) and there is no difference between indexed copy and the working tree version (if the working tree version were also different, @@ -621,7 +719,7 @@ working tree file has further modifications (one addition and one deletion).</p></div> </dd> -<dt> +<dt class="hdlist1"> update </dt> <dd> @@ -634,7 +732,7 @@ omitted, all remaining patches are taken. E.g. "7-" to choose 7,8,9 from the list. You can say <em>*</em> to choose everything. </p> -<div class="para"><p>What you chose are then highlighted with <em>*</em>, +<div class="paragraph"><p>What you chose are then highlighted with <em>*</em>, like this:</p></div> <div class="listingblock"> <div class="content"> @@ -642,16 +740,16 @@ 1: binary nothing foo.png * 2: +403/-35 +1/-1 git-add--interactive.perl</tt></pre> </div></div> -<div class="para"><p>To remove selection, prefix the input with <tt>-</tt> +<div class="paragraph"><p>To remove selection, prefix the input with <tt>-</tt> like this:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>Update>> -2</tt></pre> </div></div> -<div class="para"><p>After making the selection, answer with an empty line to stage the +<div class="paragraph"><p>After making the selection, answer with an empty line to stage the contents of working tree files for selected paths in the index.</p></div> </dd> -<dt> +<dt class="hdlist1"> revert </dt> <dd> @@ -661,7 +759,7 @@ HEAD version. Reverting new paths makes them untracked. </p> </dd> -<dt> +<dt class="hdlist1"> add untracked </dt> <dd> @@ -670,7 +768,7 @@ <em>revert</em>, and lets you add untracked paths to the index. </p> </dd> -<dt> +<dt class="hdlist1"> patch </dt> <dd> @@ -697,10 +795,10 @@ e - manually edit the current hunk ? - print help</tt></pre> </div></div> -<div class="para"><p>After deciding the fate for all hunks, if there is any hunk +<div class="paragraph"><p>After deciding the fate for all hunks, if there is any hunk that was chosen, the index is updated with the selected hunks.</p></div> </dd> -<dt> +<dt class="hdlist1"> diff </dt> <dd> @@ -711,9 +809,113 @@ </dd> </dl></div> </div> +<h2 id="_editing_patches">EDITING PATCHES</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Invoking <tt>git add -e</tt> or selecting <tt>e</tt> from the interactive hunk +selector will open a patch in your editor; after the editor exits, the +result is applied to the index. You are free to make arbitrary changes +to the patch, but note that some changes may have confusing results, or +even result in a patch that cannot be applied. If you want to abort the +operation entirely (i.e., stage nothing new in the index), simply delete +all lines of the patch. The list below describes some common things you +may see in a patch, and which editing operations make sense on them.</p></div> +<div class="dlist"><dl> +<dt class="hdlist1"> +added content +</dt> +<dd> +<p> +Added content is represented by lines beginning with "+". You can +prevent staging any addition lines by deleting them. +</p> +</dd> +<dt class="hdlist1"> +removed content +</dt> +<dd> +<p> +Removed content is represented by lines beginning with "-". You can +prevent staging their removal by converting the "-" to a " " (space). +</p> +</dd> +<dt class="hdlist1"> +modified content +</dt> +<dd> +<p> +Modified content is represented by "-" lines (removing the old content) +followed by "+" lines (adding the replacement content). You can +prevent staging the modification by converting "-" lines to " ", and +removing "+" lines. Beware that modifying only half of the pair is +likely to introduce confusing changes to the index. +</p> +</dd> +</dl></div> +<div class="paragraph"><p>There are also more complex operations that can be performed. But beware +that because the patch is applied only to the index and not the working +tree, the working tree will appear to "undo" the change in the index. +For example, introducing a a new line into the index that is in neither +the HEAD nor the working tree will stage the new line for commit, but +the line will appear to be reverted in the working tree.</p></div> +<div class="paragraph"><p>Avoid using these constructs, or do so with extreme caution.</p></div> +<div class="dlist"><dl> +<dt class="hdlist1"> +removing untouched content +</dt> +<dd> +<p> +Content which does not differ between the index and working tree may be +shown on context lines, beginning with a " " (space). You can stage +context lines for removal by converting the space to a "-". The +resulting working tree file will appear to re-add the content. +</p> +</dd> +<dt class="hdlist1"> +modifying existing content +</dt> +<dd> +<p> +One can also modify context lines by staging them for removal (by +converting " " to "-") and adding a "+" line with the new content. +Similarly, one can modify "+" lines for existing additions or +modifications. In all cases, the new modification will appear reverted +in the working tree. +</p> +</dd> +<dt class="hdlist1"> +new content +</dt> +<dd> +<p> +You may also add new content that does not exist in the patch; simply +add new lines, each starting with "+". The addition will appear +reverted in the working tree. +</p> +</dd> +</dl></div> +<div class="paragraph"><p>There are also several operations which should be avoided entirely, as +they will make the patch impossible to apply:</p></div> +<div class="ulist"><ul> +<li> +<p> +adding context (" ") or removal ("-") lines +</p> +</li> +<li> +<p> +deleting context or removal lines +</p> +</li> +<li> +<p> +modifying the contents of context or removal lines +</p> +</li> +</ul></div> +</div> <h2 id="_see_also">SEE ALSO</h2> <div class="sectionbody"> -<div class="para"><p><a href="git-status.html">git-status(1)</a> +<div class="paragraph"><p><a href="git-status.html">git-status(1)</a> <a href="git-rm.html">git-rm(1)</a> <a href="git-reset.html">git-reset(1)</a> <a href="git-mv.html">git-mv(1)</a> @@ -722,19 +924,19 @@ </div> <h2 id="_author">Author</h2> <div class="sectionbody"> -<div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org></p></div> +<div class="paragraph"><p>Written by Linus Torvalds <<a href="mailto:torvalds@osdl.org">torvalds@osdl.org</a>></p></div> </div> <h2 id="_documentation">Documentation</h2> <div class="sectionbody"> -<div class="para"><p>Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> +<div class="paragraph"><p>Documentation by Junio C Hamano and the git-list <<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>>.</p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> -<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:56:32 UTC +Last updated 2010-11-25 03:13:39 UTC </div> </div> </body>
diff --git a/git-add.txt b/git-add.txt index 73378b2..54aaaeb 100644 --- a/git-add.txt +++ b/git-add.txt
@@ -92,9 +92,11 @@ edit it. After the editor was closed, adjust the hunk headers and apply the patch to the index. + -*NOTE*: Obviously, if you change anything else than the first character -on lines beginning with a space or a minus, the patch will no longer -apply. +The intent of this option is to pick and choose lines of the patch to +apply, or even to modify the contents of lines to be staged. This can be +quicker and more flexible than using the interactive hunk selector. +However, it is easy to confuse oneself and create a patch that does not +apply to the index. See EDITING PATCHES below. -u:: --update:: @@ -295,6 +297,78 @@ This lets you review what will be committed (i.e. between HEAD and index). + +EDITING PATCHES +--------------- + +Invoking `git add -e` or selecting `e` from the interactive hunk +selector will open a patch in your editor; after the editor exits, the +result is applied to the index. You are free to make arbitrary changes +to the patch, but note that some changes may have confusing results, or +even result in a patch that cannot be applied. If you want to abort the +operation entirely (i.e., stage nothing new in the index), simply delete +all lines of the patch. The list below describes some common things you +may see in a patch, and which editing operations make sense on them. + +-- +added content:: + +Added content is represented by lines beginning with "{plus}". You can +prevent staging any addition lines by deleting them. + +removed content:: + +Removed content is represented by lines beginning with "-". You can +prevent staging their removal by converting the "-" to a " " (space). + +modified content:: + +Modified content is represented by "-" lines (removing the old content) +followed by "{plus}" lines (adding the replacement content). You can +prevent staging the modification by converting "-" lines to " ", and +removing "{plus}" lines. Beware that modifying only half of the pair is +likely to introduce confusing changes to the index. +-- + +There are also more complex operations that can be performed. But beware +that because the patch is applied only to the index and not the working +tree, the working tree will appear to "undo" the change in the index. +For example, introducing a a new line into the index that is in neither +the HEAD nor the working tree will stage the new line for commit, but +the line will appear to be reverted in the working tree. + +Avoid using these constructs, or do so with extreme caution. + +-- +removing untouched content:: + +Content which does not differ between the index and working tree may be +shown on context lines, beginning with a " " (space). You can stage +context lines for removal by converting the space to a "-". The +resulting working tree file will appear to re-add the content. + +modifying existing content:: + +One can also modify context lines by staging them for removal (by +converting " " to "-") and adding a "{plus}" line with the new content. +Similarly, one can modify "{plus}" lines for existing additions or +modifications. In all cases, the new modification will appear reverted +in the working tree. + +new content:: + +You may also add new content that does not exist in the patch; simply +add new lines, each starting with "{plus}". The addition will appear +reverted in the working tree. +-- + +There are also several operations which should be avoided entirely, as +they will make the patch impossible to apply: + +* adding context (" ") or removal ("-") lines +* deleting context or removal lines +* modifying the contents of context or removal lines + SEE ALSO -------- linkgit:git-status[1]
diff --git a/git-branch.html b/git-branch.html index d58dc87..a68800e 100644 --- a/git-branch.html +++ b/git-branch.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>git-branch(1)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -271,7 +339,24 @@ margin-left: 6em; font-size: 0.9em; } -include1::./stylesheets/xhtml11-manpage.css[] +/* Overrides for manpage documents */ +h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +h2 { + border-style: none; +} +div.sectionbody { + margin-left: 5%; +} + +@media print { + div#toc { display: none; } +} + /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { @@ -280,6 +365,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -292,8 +378,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -304,7 +399,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>git-branch(1)</title> </head> <body> <div id="header"> @@ -318,47 +412,50 @@ </p> </div> </div> -<h2>SYNOPSIS</h2> +<h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> <div class="verseblock"> -<div class="content"><em>git branch</em> [--color[=<when>] | --no-color] [-r | -a] +<div class="verseblock-content"><em>git branch</em> [--color[=<when>] | --no-color] [-r | -a] [-v [--abbrev=<length> | --no-abbrev]] [(--merged | --no-merged | --contains) [<commit>]] <em>git branch</em> [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>] <em>git branch</em> (-m | -M) [<oldbranch>] <newbranch> -<em>git branch</em> (-d | -D) [-r] <branchname>…</div></div> +<em>git branch</em> (-d | -D) [-r] <branchname>…</div> +<div class="verseblock-attribution"> +</div></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="para"><p>With no arguments, existing branches are listed and the current branch will +<div class="paragraph"><p>With no arguments, existing branches are listed and the current branch will be highlighted with an asterisk. Option <tt>-r</tt> causes the remote-tracking branches to be listed, and option <tt>-a</tt> shows both.</p></div> -<div class="para"><p>With <tt>--contains</tt>, shows only the branches that contain the named commit +<div class="paragraph"><p>With <tt>--contains</tt>, shows only the branches that contain the named commit (in other words, the branches whose tip commits are descendants of the named commit). With <tt>--merged</tt>, only branches merged into the named commit (i.e. the branches whose tip commits are reachable from the named commit) will be listed. With <tt>--no-merged</tt> only branches not merged into the named commit will be listed. If the <commit> argument is missing it defaults to <em>HEAD</em> (i.e. the tip of the current branch).</p></div> -<div class="para"><p>The command's second form creates a new branch head named <branchname> +<div class="paragraph"><p>The command’s second form creates a new branch head named <branchname> which points to the current <em>HEAD</em>, or <start-point> if given.</p></div> -<div class="para"><p>Note that this will create the new branch, but it will not switch the +<div class="paragraph"><p>Note that this will create the new branch, but it will not switch the working tree to it; use "git checkout <newbranch>" to switch to the new branch.</p></div> -<div class="para"><p>When a local branch is started off a remote branch, git sets up the +<div class="paragraph"><p>When a local branch is started off a remote-tracking branch, git sets up the branch so that <em>git pull</em> will appropriately merge from -the remote branch. This behavior may be changed via the global +the remote-tracking branch. This behavior may be changed via the global <tt>branch.autosetupmerge</tt> configuration flag. That setting can be -overridden by using the <tt>--track</tt> and <tt>--no-track</tt> options.</p></div> -<div class="para"><p>With a <em>-m</em> or <em>-M</em> option, <oldbranch> will be renamed to <newbranch>. +overridden by using the <tt>--track</tt> and <tt>--no-track</tt> options, and +changed later using <tt>git branch --set-upstream</tt>.</p></div> +<div class="paragraph"><p>With a <em>-m</em> or <em>-M</em> option, <oldbranch> will be renamed to <newbranch>. If <oldbranch> had a corresponding reflog, it is renamed to match <newbranch>, and a reflog entry is created to remember the branch renaming. If <newbranch> exists, -M must be used to force the rename to happen.</p></div> -<div class="para"><p>With a <tt>-d</tt> or <tt>-D</tt> option, <tt><branchname></tt> will be deleted. You may +<div class="paragraph"><p>With a <tt>-d</tt> or <tt>-D</tt> option, <tt><branchname></tt> will be deleted. You may specify more than one branch for deletion. If the branch currently has a reflog then the reflog will also be deleted.</p></div> -<div class="para"><p>Use -r together with -d to delete remote-tracking branches. Note, that it +<div class="paragraph"><p>Use -r together with -d to delete remote-tracking branches. Note, that it only makes sense to delete remote-tracking branches if they no longer exist in the remote repository or if <em>git fetch</em> was configured not to fetch them again. See also the <em>prune</em> subcommand of <a href="git-remote.html">git-remote(1)</a> for a @@ -366,8 +463,8 @@ </div> <h2 id="_options">OPTIONS</h2> <div class="sectionbody"> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> -d </dt> <dd> @@ -377,7 +474,7 @@ <tt>--track</tt> or <tt>--set-upstream</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> -D </dt> <dd> @@ -385,22 +482,22 @@ Delete a branch irrespective of its merged status. </p> </dd> -<dt> +<dt class="hdlist1"> -l </dt> <dd> <p> - Create the branch's reflog. This activates recording of + Create the branch’s reflog. This activates recording of all changes made to the branch ref, enabling use of date based sha1 expressions such as "<branchname>@{yesterday}". Note that in non-bare repositories, reflogs are usually enabled by default by the <tt>core.logallrefupdates</tt> config option. </p> </dd> -<dt> +<dt class="hdlist1"> -f </dt> -<dt> +<dt class="hdlist1"> --force </dt> <dd> @@ -409,7 +506,7 @@ already. Without <tt>-f</tt> <em>git branch</em> refuses to change an existing branch. </p> </dd> -<dt> +<dt class="hdlist1"> -m </dt> <dd> @@ -417,7 +514,7 @@ Move/rename a branch and the corresponding reflog. </p> </dd> -<dt> +<dt class="hdlist1"> -M </dt> <dd> @@ -425,16 +522,17 @@ Move/rename a branch even if the new branch name already exists. </p> </dd> -<dt> +<dt class="hdlist1"> --color[=<when>] </dt> <dd> <p> - Color branches to highlight current, local, and remote branches. + Color branches to highlight current, local, and + remote-tracking branches. The value must be always (the default), never, or auto. </p> </dd> -<dt> +<dt class="hdlist1"> --no-color </dt> <dd> @@ -444,7 +542,7 @@ Same as <tt>--color=never</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> -r </dt> <dd> @@ -452,7 +550,7 @@ List or delete (if used with -d) the remote-tracking branches. </p> </dd> -<dt> +<dt class="hdlist1"> -a </dt> <dd> @@ -460,10 +558,10 @@ List both remote-tracking branches and local branches. </p> </dd> -<dt> +<dt class="hdlist1"> -v </dt> -<dt> +<dt class="hdlist1"> --verbose </dt> <dd> @@ -473,16 +571,16 @@ the name of the upstream branch, as well. </p> </dd> -<dt> +<dt class="hdlist1"> --abbrev=<length> </dt> <dd> <p> - Alter the sha1's minimum display length in the output listing. + Alter the sha1’s minimum display length in the output listing. The default value is 7. </p> </dd> -<dt> +<dt class="hdlist1"> --no-abbrev </dt> <dd> @@ -490,10 +588,10 @@ Display the full sha1s in the output listing rather than abbreviating them. </p> </dd> -<dt> +<dt class="hdlist1"> -t </dt> -<dt> +<dt class="hdlist1"> --track </dt> <dd> @@ -505,13 +603,13 @@ it directs <tt>git pull</tt> without arguments to pull from the upstream when the new branch is checked out. </p> -<div class="para"><p>This behavior is the default when the start point is a remote branch. +<div class="paragraph"><p>This behavior is the default when the start point is a remote-tracking branch. Set the branch.autosetupmerge configuration variable to <tt>false</tt> if you want <tt>git checkout</tt> and <tt>git branch</tt> to always behave as if <em>--no-track</em> were given. Set it to <tt>always</tt> if you want this behavior when the -start-point is either a local or remote branch.</p></div> +start-point is either a local or remote-tracking branch.</p></div> </dd> -<dt> +<dt class="hdlist1"> --no-track </dt> <dd> @@ -520,7 +618,7 @@ branch.autosetupmerge configuration variable is true. </p> </dd> -<dt> +<dt class="hdlist1"> --set-upstream </dt> <dd> @@ -531,7 +629,7 @@ branch points to is not changed. </p> </dd> -<dt> +<dt class="hdlist1"> --contains <commit> </dt> <dd> @@ -539,7 +637,7 @@ Only list branches which contain the specified commit. </p> </dd> -<dt> +<dt class="hdlist1"> --merged [<commit>] </dt> <dd> @@ -548,7 +646,7 @@ specified commit (HEAD if not specified). </p> </dd> -<dt> +<dt class="hdlist1"> --no-merged [<commit>] </dt> <dd> @@ -557,7 +655,7 @@ specified commit (HEAD if not specified). </p> </dd> -<dt> +<dt class="hdlist1"> <branchname> </dt> <dd> @@ -568,7 +666,7 @@ may restrict the characters allowed in a branch name. </p> </dd> -<dt> +<dt class="hdlist1"> <start-point> </dt> <dd> @@ -578,7 +676,7 @@ option is omitted, the current HEAD will be used instead. </p> </dd> -<dt> +<dt class="hdlist1"> <oldbranch> </dt> <dd> @@ -586,7 +684,7 @@ The name of an existing branch to rename. </p> </dd> -<dt> +<dt class="hdlist1"> <newbranch> </dt> <dd> @@ -599,8 +697,8 @@ </div> <h2 id="_examples">Examples</h2> <div class="sectionbody"> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> Start development from a known tag </dt> <dd> @@ -608,10 +706,10 @@ <div class="content"> <pre><tt>$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6 $ cd my2.6 -$ git branch my2.6.14 v2.6.14 <b>(1)</b> +$ git branch my2.6.14 v2.6.14 <b><1></b> $ git checkout my2.6.14</tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> This step and the next one could be combined into a single step with @@ -620,7 +718,7 @@ </li> </ol></div> </dd> -<dt> +<dt class="hdlist1"> Delete an unneeded branch </dt> <dd> @@ -628,10 +726,10 @@ <div class="content"> <pre><tt>$ git clone git://git.kernel.org/.../git.git my.git $ cd my.git -$ git branch -d -r origin/todo origin/html origin/man <b>(1)</b> -$ git branch -D test <b>(2)</b></tt></pre> +$ git branch -d -r origin/todo origin/html origin/man <b><1></b> +$ git branch -D test <b><2></b></tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> Delete the remote-tracking branches "todo", "html" and "man". The next @@ -651,12 +749,12 @@ </div> <h2 id="_notes">Notes</h2> <div class="sectionbody"> -<div class="para"><p>If you are creating a branch that you want to checkout immediately, it is +<div class="paragraph"><p>If you are creating a branch that you want to checkout immediately, it is easier to use the git checkout command with its <tt>-b</tt> option to create a branch and check it out with a single command.</p></div> -<div class="para"><p>The options <tt>--contains</tt>, <tt>--merged</tt> and <tt>--no-merged</tt> serve three related +<div class="paragraph"><p>The options <tt>--contains</tt>, <tt>--merged</tt> and <tt>--no-merged</tt> serve three related but different purposes:</p></div> -<div class="ilist"><ul> +<div class="ulist"><ul> <li> <p> <tt>--contains <commit></tt> is used to find all branches which will need @@ -680,27 +778,27 @@ </div> <h2 id="_see_also">SEE ALSO</h2> <div class="sectionbody"> -<div class="para"><p><a href="git-check-ref-format.html">git-check-ref-format(1)</a>, +<div class="paragraph"><p><a href="git-check-ref-format.html">git-check-ref-format(1)</a>, <a href="git-fetch.html">git-fetch(1)</a>, <a href="git-remote.html">git-remote(1)</a>, <a href="user-manual.html#what-is-a-branch">“Understanding history: What is -a branch?”</a> in the Git User's Manual.</p></div> +a branch?”</a> in the Git User’s Manual.</p></div> </div> <h2 id="_author">Author</h2> <div class="sectionbody"> -<div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org> and Junio C Hamano <gitster@pobox.com></p></div> +<div class="paragraph"><p>Written by Linus Torvalds <<a href="mailto:torvalds@osdl.org">torvalds@osdl.org</a>> and Junio C Hamano <<a href="mailto:gitster@pobox.com">gitster@pobox.com</a>></p></div> </div> <h2 id="_documentation">Documentation</h2> <div class="sectionbody"> -<div class="para"><p>Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> +<div class="paragraph"><p>Documentation by Junio C Hamano and the git-list <<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>>.</p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> -<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:56:34 UTC +Last updated 2010-11-25 03:13:40 UTC </div> </div> </body>
diff --git a/git-branch.txt b/git-branch.txt index 1940256..9106d38 100644 --- a/git-branch.txt +++ b/git-branch.txt
@@ -37,11 +37,12 @@ working tree to it; use "git checkout <newbranch>" to switch to the new branch. -When a local branch is started off a remote branch, git sets up the +When a local branch is started off a remote-tracking branch, git sets up the branch so that 'git pull' will appropriately merge from -the remote branch. This behavior may be changed via the global +the remote-tracking branch. This behavior may be changed via the global `branch.autosetupmerge` configuration flag. That setting can be -overridden by using the `--track` and `--no-track` options. +overridden by using the `--track` and `--no-track` options, and +changed later using `git branch --set-upstream`. With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>. If <oldbranch> had a corresponding reflog, it is renamed to match @@ -89,7 +90,8 @@ Move/rename a branch even if the new branch name already exists. --color[=<when>]:: - Color branches to highlight current, local, and remote branches. + Color branches to highlight current, local, and + remote-tracking branches. The value must be always (the default), never, or auto. --no-color:: @@ -125,11 +127,11 @@ it directs `git pull` without arguments to pull from the upstream when the new branch is checked out. + -This behavior is the default when the start point is a remote branch. +This behavior is the default when the start point is a remote-tracking branch. Set the branch.autosetupmerge configuration variable to `false` if you want `git checkout` and `git branch` to always behave as if '--no-track' were given. Set it to `always` if you want this behavior when the -start-point is either a local or remote branch. +start-point is either a local or remote-tracking branch. --no-track:: Do not set up "upstream" configuration, even if the
diff --git a/git-checkout.html b/git-checkout.html index b770c10..f4c8484 100644 --- a/git-checkout.html +++ b/git-checkout.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>git-checkout(1)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -271,7 +339,24 @@ margin-left: 6em; font-size: 0.9em; } -include1::./stylesheets/xhtml11-manpage.css[] +/* Overrides for manpage documents */ +h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +h2 { + border-style: none; +} +div.sectionbody { + margin-left: 5%; +} + +@media print { + div#toc { display: none; } +} + /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { @@ -280,6 +365,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -292,8 +378,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -304,7 +399,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>git-checkout(1)</title> </head> <body> <div id="header"> @@ -318,25 +412,27 @@ </p> </div> </div> -<h2>SYNOPSIS</h2> +<h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> <div class="verseblock"> -<div class="content"><em>git checkout</em> [-q] [-f] [-m] [<branch>] +<div class="verseblock-content"><em>git checkout</em> [-q] [-f] [-m] [<branch>] <em>git checkout</em> [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>] <em>git checkout</em> [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>… -<em>git checkout</em> --patch [<tree-ish>] [--] [<paths>…]</div></div> +<em>git checkout</em> --patch [<tree-ish>] [--] [<paths>…]</div> +<div class="verseblock-attribution"> +</div></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="para"><p>Updates files in the working tree to match the version in the index +<div class="paragraph"><p>Updates files in the working tree to match the version in the index or the specified tree. If no paths are given, <em>git checkout</em> will also update <tt>HEAD</tt> to set the specified branch as the current branch.</p></div> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> <em>git checkout</em> [<branch>] </dt> -<dt> +<dt class="hdlist1"> <em>git checkout</em> -b|-B <new_branch> [<start point>] </dt> <dd> @@ -344,22 +440,22 @@ This form switches branches by updating the index, working tree, and HEAD to reflect the specified branch. </p> -<div class="para"><p>If <tt>-b</tt> is given, a new branch is created as if <a href="git-branch.html">git-branch(1)</a> +<div class="paragraph"><p>If <tt>-b</tt> is given, a new branch is created as if <a href="git-branch.html">git-branch(1)</a> were called and then checked out; in this case you can use the <tt>--track</tt> or <tt>--no-track</tt> options, which will be passed to <em>git branch</em>. As a convenience, <tt>--track</tt> without <tt>-b</tt> implies branch creation; see the description of <tt>--track</tt> below.</p></div> -<div class="para"><p>If <tt>-B</tt> is given, <new_branch> is created if it doesn't exist; otherwise, it +<div class="paragraph"><p>If <tt>-B</tt> is given, <new_branch> is created if it doesn’t exist; otherwise, it is reset. This is the transactional equivalent of</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git branch -f <branch> [<start point>] $ git checkout <branch></tt></pre> </div></div> -<div class="para"><p>that is to say, the branch is not reset/created unless "git checkout" is +<div class="paragraph"><p>that is to say, the branch is not reset/created unless "git checkout" is successful.</p></div> </dd> -<dt> +<dt class="hdlist1"> <em>git checkout</em> [--patch] [<tree-ish>] [--] <pathspec>… </dt> <dd> @@ -373,7 +469,7 @@ (i.e. commit, tag or tree) to update the index for the given paths before updating the working tree. </p> -<div class="para"><p>The index may contain unmerged entries because of a previous failed merge. +<div class="paragraph"><p>The index may contain unmerged entries because of a previous failed merge. By default, if you try to check out such an entry from the index, the checkout operation will fail and nothing will be checked out. Using <tt>-f</tt> will ignore these unmerged entries. The contents from a @@ -385,11 +481,11 @@ </div> <h2 id="_options">OPTIONS</h2> <div class="sectionbody"> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> -q </dt> -<dt> +<dt class="hdlist1"> --quiet </dt> <dd> @@ -397,10 +493,10 @@ Quiet, suppress feedback messages. </p> </dd> -<dt> +<dt class="hdlist1"> -f </dt> -<dt> +<dt class="hdlist1"> --force </dt> <dd> @@ -409,13 +505,13 @@ working tree differs from HEAD. This is used to throw away local changes. </p> -<div class="para"><p>When checking out paths from the index, do not fail upon unmerged +<div class="paragraph"><p>When checking out paths from the index, do not fail upon unmerged entries; instead, unmerged entries are ignored.</p></div> </dd> -<dt> +<dt class="hdlist1"> --ours </dt> -<dt> +<dt class="hdlist1"> --theirs </dt> <dd> @@ -424,7 +520,7 @@ (<em>ours</em>) or #3 (<em>theirs</em>) for unmerged paths. </p> </dd> -<dt> +<dt class="hdlist1"> -b </dt> <dd> @@ -433,7 +529,7 @@ <start_point>; see <a href="git-branch.html">git-branch(1)</a> for details. </p> </dd> -<dt> +<dt class="hdlist1"> -B </dt> <dd> @@ -444,10 +540,10 @@ <a href="git-branch.html">git-branch(1)</a> for details. </p> </dd> -<dt> +<dt class="hdlist1"> -t </dt> -<dt> +<dt class="hdlist1"> --track </dt> <dd> @@ -455,8 +551,8 @@ When creating a new branch, set up "upstream" configuration. See "--track" in <a href="git-branch.html">git-branch(1)</a> for details. </p> -<div class="para"><p>If no <em>-b</em> option is given, the name of the new branch will be -derived from the remote branch. If "remotes/" or "refs/remotes/" +<div class="paragraph"><p>If no <em>-b</em> option is given, the name of the new branch will be +derived from the remote-tracking branch. If "remotes/" or "refs/remotes/" is prefixed it is stripped away, and then the part up to the next slash (which would be the nickname of the remote) is removed. This would tell us to use "hack" as the local branch when branching @@ -465,7 +561,7 @@ guessing results in an empty name, the guessing is aborted. You can explicitly give a name with <em>-b</em> in such a case.</p></div> </dd> -<dt> +<dt class="hdlist1"> --no-track </dt> <dd> @@ -474,16 +570,16 @@ branch.autosetupmerge configuration variable is true. </p> </dd> -<dt> +<dt class="hdlist1"> -l </dt> <dd> <p> - Create the new branch's reflog; see <a href="git-branch.html">git-branch(1)</a> for + Create the new branch’s reflog; see <a href="git-branch.html">git-branch(1)</a> for details. </p> </dd> -<dt> +<dt class="hdlist1"> --orphan </dt> <dd> @@ -494,26 +590,26 @@ history totally disconnected from all the other branches and commits. </p> -<div class="para"><p>The index and the working tree are adjusted as if you had previously run +<div class="paragraph"><p>The index and the working tree are adjusted as if you had previously run "git checkout <start_point>". This allows you to start a new history that records a set of paths similar to <start_point> by easily running "git commit -a" to make the root commit.</p></div> -<div class="para"><p>This can be useful when you want to publish the tree from a commit +<div class="paragraph"><p>This can be useful when you want to publish the tree from a commit without exposing its full history. You might want to do this to publish an open source branch of a project whose current tree is "clean", but whose full history contains proprietary or otherwise encumbered bits of code.</p></div> -<div class="para"><p>If you want to start a disconnected history that records a set of paths +<div class="paragraph"><p>If you want to start a disconnected history that records a set of paths that is totally different from the one of <start_point>, then you should clear the index and the working tree right after creating the orphan branch by running "git rm -rf ." from the top level of the working tree. Afterwards you will be ready to prepare your new files, repopulating the working tree, by copying them from elsewhere, extracting a tarball, etc.</p></div> </dd> -<dt> +<dt class="hdlist1"> -m </dt> -<dt> +<dt class="hdlist1"> --merge </dt> <dd> @@ -527,14 +623,14 @@ branch, your working tree contents, and the new branch is done, and you will be on the new branch. </p> -<div class="para"><p>When a merge conflict happens, the index entries for conflicting +<div class="paragraph"><p>When a merge conflict happens, the index entries for conflicting paths are left unmerged, and you need to resolve the conflicts and mark the resolved paths with <tt>git add</tt> (or <tt>git rm</tt> if the merge should result in deletion of the path).</p></div> -<div class="para"><p>When checking out paths from the index, this option lets you recreate +<div class="paragraph"><p>When checking out paths from the index, this option lets you recreate the conflicted merge in the specified paths.</p></div> </dd> -<dt> +<dt class="hdlist1"> --conflict=<style> </dt> <dd> @@ -546,10 +642,10 @@ "merge" style, shows the original contents). </p> </dd> -<dt> +<dt class="hdlist1"> -p </dt> -<dt> +<dt class="hdlist1"> --patch </dt> <dd> @@ -559,10 +655,10 @@ tree. The chosen hunks are then applied in reverse to the working tree (and if a <tree-ish> was specified, the index). </p> -<div class="para"><p>This means that you can use <tt>git checkout -p</tt> to selectively discard +<div class="paragraph"><p>This means that you can use <tt>git checkout -p</tt> to selectively discard edits from your current working tree.</p></div> </dd> -<dt> +<dt class="hdlist1"> <branch> </dt> <dd> @@ -573,14 +669,14 @@ commit, your HEAD becomes "detached" and you are no longer on any branch (see below for details). </p> -<div class="para"><p>As a special case, the <tt>"@{-N}"</tt> syntax for the N-th last branch +<div class="paragraph"><p>As a special case, the <tt>"@{-N}"</tt> syntax for the N-th last branch checks out the branch (instead of detaching). You may also specify <tt>-</tt> which is synonymous with <tt>"@{-1}"</tt>.</p></div> -<div class="para"><p>As a further special case, you may use <tt>"A...B"</tt> as a shortcut for the +<div class="paragraph"><p>As a further special case, you may use <tt>"A...B"</tt> as a shortcut for the merge base of <tt>A</tt> and <tt>B</tt> if there is exactly one merge base. You can leave out at most one of <tt>A</tt> and <tt>B</tt>, in which case it defaults to <tt>HEAD</tt>.</p></div> </dd> -<dt> +<dt class="hdlist1"> <new_branch> </dt> <dd> @@ -588,7 +684,7 @@ Name for the new branch. </p> </dd> -<dt> +<dt class="hdlist1"> <start_point> </dt> <dd> @@ -597,7 +693,7 @@ <a href="git-branch.html">git-branch(1)</a> for details. Defaults to HEAD. </p> </dd> -<dt> +<dt class="hdlist1"> <tree-ish> </dt> <dd> @@ -610,7 +706,7 @@ </div> <h2 id="_detached_head">Detached HEAD</h2> <div class="sectionbody"> -<div class="para"><p>It is sometimes useful to be able to <em>checkout</em> a commit that is +<div class="paragraph"><p>It is sometimes useful to be able to <em>checkout</em> a commit that is not at the tip of one of your branches. The most obvious example is to check out the commit at a tagged official release point, like this:</p></div> @@ -618,17 +714,17 @@ <div class="content"> <pre><tt>$ git checkout v2.6.18</tt></pre> </div></div> -<div class="para"><p>Earlier versions of git did not allow this and asked you to +<div class="paragraph"><p>Earlier versions of git did not allow this and asked you to create a temporary branch using the <tt>-b</tt> option, but starting from version 1.5.0, the above command <em>detaches</em> your HEAD from the current branch and directly points at the commit named by the tag (<tt>v2.6.18</tt> in the example above).</p></div> -<div class="para"><p>You can use all git commands while in this state. You can use +<div class="paragraph"><p>You can use all git commands while in this state. You can use <tt>git reset --hard $othercommit</tt> to further move around, for example. You can make changes and create a new commit on top of a detached HEAD. You can even create a merge by using <tt>git merge $othercommit</tt>.</p></div> -<div class="para"><p>The state you are in while your HEAD is detached is not recorded +<div class="paragraph"><p>The state you are in while your HEAD is detached is not recorded by any branch (which is natural --- you are not on any branch). What this means is that you can discard your temporary commits and merges by switching back to an existing branch (e.g. <tt>git @@ -642,7 +738,7 @@ </div> <h2 id="_examples">EXAMPLES</h2> <div class="sectionbody"> -<div class="olist"><ol> +<div class="olist arabic"><ol class="arabic"> <li> <p> The following sequence checks out the <tt>master</tt> branch, reverts @@ -651,12 +747,12 @@ </p> <div class="listingblock"> <div class="content"> -<pre><tt>$ git checkout master <b>(1)</b> -$ git checkout master~2 Makefile <b>(2)</b> +<pre><tt>$ git checkout master <b><1></b> +$ git checkout master~2 Makefile <b><2></b> $ rm -f hello.c -$ git checkout hello.c <b>(3)</b></tt></pre> +$ git checkout hello.c <b><3></b></tt></pre> </div></div> -<div class="colist"><ol> +<div class="colist arabic"><ol> <li> <p> switch branch @@ -671,7 +767,7 @@ <p> restore hello.c from the index </p> -<div class="para"><p>If you have an unfortunate branch that is named <tt>hello.c</tt>, this +<div class="paragraph"><p>If you have an unfortunate branch that is named <tt>hello.c</tt>, this step would be confused as an instruction to switch to that branch. You should instead write:</p></div> <div class="listingblock"> @@ -690,7 +786,7 @@ <div class="content"> <pre><tt>$ git checkout mytopic</tt></pre> </div></div> -<div class="para"><p>However, your "wrong" branch and correct "mytopic" branch may +<div class="paragraph"><p>However, your "wrong" branch and correct "mytopic" branch may differ in files that you have modified locally, in which case the above checkout would fail like this:</p></div> <div class="listingblock"> @@ -698,14 +794,14 @@ <pre><tt>$ git checkout mytopic error: You have local changes to 'frotz'; not switching branches.</tt></pre> </div></div> -<div class="para"><p>You can give the <tt>-m</tt> flag to the command, which would try a +<div class="paragraph"><p>You can give the <tt>-m</tt> flag to the command, which would try a three-way merge:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git checkout -m mytopic Auto-merging frotz</tt></pre> </div></div> -<div class="para"><p>After this three-way merge, the local modifications are _not_ +<div class="paragraph"><p>After this three-way merge, the local modifications are <em>not</em> registered in your index file, so <tt>git diff</tt> would show you what changes you made since the tip of the new branch.</p></div> </li> @@ -721,7 +817,7 @@ ERROR: Merge conflict in frotz fatal: merge program failed</tt></pre> </div></div> -<div class="para"><p>At this point, <tt>git diff</tt> shows the changes cleanly merged as in +<div class="paragraph"><p>At this point, <tt>git diff</tt> shows the changes cleanly merged as in the previous example, as well as the changes in the conflicted files. Edit and resolve the conflict and mark it resolved with <tt>git add</tt> as usual:</p></div> @@ -735,19 +831,19 @@ </div> <h2 id="_author">Author</h2> <div class="sectionbody"> -<div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org></p></div> +<div class="paragraph"><p>Written by Linus Torvalds <<a href="mailto:torvalds@osdl.org">torvalds@osdl.org</a>></p></div> </div> <h2 id="_documentation">Documentation</h2> <div class="sectionbody"> -<div class="para"><p>Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> +<div class="paragraph"><p>Documentation by Junio C Hamano and the git-list <<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>>.</p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> -<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-28 05:49:36 UTC +Last updated 2010-11-25 03:13:40 UTC </div> </div> </body>
diff --git a/git-checkout.txt b/git-checkout.txt index 22d3611..880763d 100644 --- a/git-checkout.txt +++ b/git-checkout.txt
@@ -98,7 +98,7 @@ "--track" in linkgit:git-branch[1] for details. + If no '-b' option is given, the name of the new branch will be -derived from the remote branch. If "remotes/" or "refs/remotes/" +derived from the remote-tracking branch. If "remotes/" or "refs/remotes/" is prefixed it is stripped away, and then the part up to the next slash (which would be the nickname of the remote) is removed. This would tell us to use "hack" as the local branch when branching
diff --git a/git-clone.html b/git-clone.html index 2b71e1d..f4287a5 100644 --- a/git-clone.html +++ b/git-clone.html
@@ -591,7 +591,7 @@ Set up a mirror of the source repository. This implies <tt>--bare</tt>. Compared to <tt>--bare</tt>, <tt>--mirror</tt> not only maps local branches of the source to local branches of the target, it maps all refs (including - remote branches, notes etc.) and sets up a refspec configuration such + remote-tracking branches, notes etc.) and sets up a refspec configuration such that all these refs are overwritten by a <tt>git remote update</tt> in the target repository. </p> @@ -893,7 +893,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-11-06 00:41:57 UTC +Last updated 2010-11-25 03:13:40 UTC </div> </div> </body>
diff --git a/git-clone.txt b/git-clone.txt index ab72933..2320382 100644 --- a/git-clone.txt +++ b/git-clone.txt
@@ -131,7 +131,7 @@ Set up a mirror of the source repository. This implies `--bare`. Compared to `--bare`, `--mirror` not only maps local branches of the source to local branches of the target, it maps all refs (including - remote branches, notes etc.) and sets up a refspec configuration such + remote-tracking branches, notes etc.) and sets up a refspec configuration such that all these refs are overwritten by a `git remote update` in the target repository.
diff --git a/git-config.html b/git-config.html index dfbb4de..33354b7 100644 --- a/git-config.html +++ b/git-config.html
@@ -1717,8 +1717,8 @@ this behavior can be chosen per-branch using the <tt>--track</tt> and <tt>--no-track</tt> options. The valid settings are: <tt>false</tt> — no automatic setup is done; <tt>true</tt> — automatic setup is done when the - starting point is a remote branch; <tt>always</tt> — automatic setup is - done when the starting point is either a local branch or remote + starting point is a remote-tracking branch; <tt>always</tt> —  automatic setup is done when the starting point is either a + local branch or remote-tracking branch. This option defaults to true. </p> </dd> @@ -1734,7 +1734,7 @@ When <tt>local</tt>, rebase is set to true for tracked branches of other local branches. When <tt>remote</tt>, rebase is set to true for tracked branches of - remote branches. + remote-tracking branches. When <tt>always</tt>, rebase will be set to true for all tracking branches. See "branch.autosetupmerge" for details on how to set up a @@ -1846,7 +1846,7 @@ <p> Use customized color for branch coloration. <tt><slot></tt> is one of <tt>current</tt> (the current branch), <tt>local</tt> (a local branch), - <tt>remote</tt> (a tracking branch in refs/remotes/), <tt>plain</tt> (other + <tt>remote</tt> (a remote-tracking branch in refs/remotes/), <tt>plain</tt> (other refs). </p> <div class="paragraph"><p>The value for these configuration variables is a list of colors (at most @@ -1888,7 +1888,7 @@ <p> Use customized color for <em>git log --decorate</em> output. <tt><slot></tt> is one of <tt>branch</tt>, <tt>remoteBranch</tt>, <tt>tag</tt>, <tt>stash</tt> or <tt>HEAD</tt> for local - branches, remote tracking branches, tags, stash and HEAD, respectively. + branches, remote-tracking branches, tags, stash and HEAD, respectively. </p> </dd> <dt class="hdlist1"> @@ -2656,7 +2656,7 @@ </dt> <dd> <p> - "true" if <a href="git-gui.html">git-gui(1)</a> should prune tracking branches when + "true" if <a href="git-gui.html">git-gui(1)</a> should prune remote-tracking branches when performing a fetch. The default value is "false". </p> </dd>
diff --git a/git-daemon.html b/git-daemon.html index a41a1cc..70a27ab 100644 --- a/git-daemon.html +++ b/git-daemon.html
@@ -513,7 +513,8 @@ <dd> <p> Have the server run as an inetd service. Implies --syslog. - Incompatible with --port, --listen, --user and --group options. + Incompatible with --detach, --port, --listen, --user and --group + options. </p> </dd> <dt class="hdlist1"> @@ -850,7 +851,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-11-06 00:41:57 UTC +Last updated 2010-11-25 03:13:40 UTC </div> </div> </body>
diff --git a/git-daemon.txt b/git-daemon.txt index 5054f79..d15cb6a 100644 --- a/git-daemon.txt +++ b/git-daemon.txt
@@ -78,7 +78,8 @@ --inetd:: Have the server run as an inetd service. Implies --syslog. - Incompatible with --port, --listen, --user and --group options. + Incompatible with --detach, --port, --listen, --user and --group + options. --listen=<host_or_ipaddr>:: Listen on a specific IP address or hostname. IP addresses can
diff --git a/git-describe.html b/git-describe.html index bae7a24..04e51e2 100644 --- a/git-describe.html +++ b/git-describe.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>git-describe(1)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -271,7 +339,24 @@ margin-left: 6em; font-size: 0.9em; } -include1::./stylesheets/xhtml11-manpage.css[] +/* Overrides for manpage documents */ +h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +h2 { + border-style: none; +} +div.sectionbody { + margin-left: 5%; +} + +@media print { + div#toc { display: none; } +} + /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { @@ -280,6 +365,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -292,8 +378,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -304,7 +399,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>git-describe(1)</title> </head> <body> <div id="header"> @@ -318,27 +412,29 @@ </p> </div> </div> -<h2>SYNOPSIS</h2> +<h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> <div class="verseblock"> -<div class="content"><em>git describe</em> [--all] [--tags] [--contains] [--abbrev=<n>] <committish>… -<em>git describe</em> [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>]</div></div> +<div class="verseblock-content"><em>git describe</em> [--all] [--tags] [--contains] [--abbrev=<n>] <committish>… +<em>git describe</em> [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>]</div> +<div class="verseblock-attribution"> +</div></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="para"><p>The command finds the most recent tag that is reachable from a +<div class="paragraph"><p>The command finds the most recent tag that is reachable from a commit. If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of the most recent commit.</p></div> -<div class="para"><p>By default (without --all or --tags) <tt>git describe</tt> only shows +<div class="paragraph"><p>By default (without --all or --tags) <tt>git describe</tt> only shows annotated tags. For more information about creating annotated tags see the -a and -s options to <a href="git-tag.html">git-tag(1)</a>.</p></div> </div> <h2 id="_options">OPTIONS</h2> <div class="sectionbody"> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> <committish>… </dt> <dd> @@ -346,7 +442,7 @@ Committish object names to describe. </p> </dd> -<dt> +<dt class="hdlist1"> --dirty[=<mark>] </dt> <dd> @@ -356,17 +452,17 @@ default) if the working tree is dirty. </p> </dd> -<dt> +<dt class="hdlist1"> --all </dt> <dd> <p> Instead of using only the annotated tags, use any ref found in <tt>.git/refs/</tt>. This option enables matching - any known branch, remote branch, or lightweight tag. + any known branch, remote-tracking branch, or lightweight tag. </p> </dd> -<dt> +<dt class="hdlist1"> --tags </dt> <dd> @@ -376,7 +472,7 @@ a lightweight (non-annotated) tag. </p> </dd> -<dt> +<dt class="hdlist1"> --contains </dt> <dd> @@ -386,7 +482,7 @@ Automatically implies --tags. </p> </dd> -<dt> +<dt class="hdlist1"> --abbrev=<n> </dt> <dd> @@ -397,7 +493,7 @@ will suppress long format, only showing the closest tag. </p> </dd> -<dt> +<dt class="hdlist1"> --candidates=<n> </dt> <dd> @@ -409,7 +505,7 @@ An <n> of 0 will cause only exact matches to be output. </p> </dd> -<dt> +<dt class="hdlist1"> --exact-match </dt> <dd> @@ -418,7 +514,7 @@ supplied commit). This is a synonym for --candidates=0. </p> </dd> -<dt> +<dt class="hdlist1"> --debug </dt> <dd> @@ -428,7 +524,7 @@ be printed to standard out. </p> </dd> -<dt> +<dt class="hdlist1"> --long </dt> <dd> @@ -442,7 +538,7 @@ that points at object deadbee….). </p> </dd> -<dt> +<dt class="hdlist1"> --match <pattern> </dt> <dd> @@ -451,7 +547,7 @@ leaking private tags made from the repository). </p> </dd> -<dt> +<dt class="hdlist1"> --always </dt> <dd> @@ -463,31 +559,31 @@ </div> <h2 id="_examples">EXAMPLES</h2> <div class="sectionbody"> -<div class="para"><p>With something like git.git current tree, I get:</p></div> +<div class="paragraph"><p>With something like git.git current tree, I get:</p></div> <div class="literalblock"> <div class="content"> <pre><tt>[torvalds@g5 git]$ git describe parent v1.0.4-14-g2414721</tt></pre> </div></div> -<div class="para"><p>i.e. the current head of my "parent" branch is based on v1.0.4, +<div class="paragraph"><p>i.e. the current head of my "parent" branch is based on v1.0.4, but since it has a few commits on top of that, describe has added the number of additional commits ("14") and an abbreviated object name for the commit itself ("2414721") at the end.</p></div> -<div class="para"><p>The number of additional commits is the number +<div class="paragraph"><p>The number of additional commits is the number of commits which would be displayed by "git log v1.0.4..parent". The hash suffix is "-g" + 7-char abbreviation for the tip commit of parent (which was <tt>2414721b194453f058079d897d13c4e377f92dc6</tt>). The "g" prefix stands for "git" and is used to allow describing the version of a software depending on the SCM the software is managed with. This is useful in an environment where people may use different SCMs.</p></div> -<div class="para"><p>Doing a <em>git describe</em> on a tag-name will just show the tag name:</p></div> +<div class="paragraph"><p>Doing a <em>git describe</em> on a tag-name will just show the tag name:</p></div> <div class="literalblock"> <div class="content"> <pre><tt>[torvalds@g5 git]$ git describe v1.0.4 v1.0.4</tt></pre> </div></div> -<div class="para"><p>With --all, the command can use branch heads as references, so +<div class="paragraph"><p>With --all, the command can use branch heads as references, so the output shows the reference path as well:</p></div> <div class="literalblock"> <div class="content"> @@ -499,14 +595,14 @@ <pre><tt>[torvalds@g5 git]$ git describe --all --abbrev=4 HEAD^ heads/lt/describe-7-g975b</tt></pre> </div></div> -<div class="para"><p>With --abbrev set to 0, the command can be used to find the +<div class="paragraph"><p>With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:</p></div> <div class="literalblock"> <div class="content"> <pre><tt>[torvalds@g5 git]$ git describe --abbrev=0 v1.0.5^2 tags/v1.0.0</tt></pre> </div></div> -<div class="para"><p>Note that the suffix you get if you type these commands today may be +<div class="paragraph"><p>Note that the suffix you get if you type these commands today may be longer than what Linus saw above when he ran these commands, as your git repository may have new commits whose object names begin with 975b that did not exist back then, and "-g975b" suffix alone may not @@ -514,16 +610,16 @@ </div> <h2 id="_search_strategy">SEARCH STRATEGY</h2> <div class="sectionbody"> -<div class="para"><p>For each committish supplied, <em>git describe</em> will first look for +<div class="paragraph"><p>For each committish supplied, <em>git describe</em> will first look for a tag which tags exactly that commit. Annotated tags will always be preferred over lightweight tags, and tags with newer dates will always be preferred over tags with older dates. If an exact match is found, its name will be output and searching will stop.</p></div> -<div class="para"><p>If an exact match was not found, <em>git describe</em> will walk back +<div class="paragraph"><p>If an exact match was not found, <em>git describe</em> will walk back through the commit history to locate an ancestor commit which -has been tagged. The ancestor's tag will be output along with an -abbreviation of the input committish's SHA1.</p></div> -<div class="para"><p>If multiple tags were found during the walk then the tag which +has been tagged. The ancestor’s tag will be output along with an +abbreviation of the input committish’s SHA1.</p></div> +<div class="paragraph"><p>If multiple tags were found during the walk then the tag which has the fewest commits different from the input committish will be selected and output. Here fewest commits different is defined as the number of commits which would be shown by <tt>git log tag..input</tt> @@ -531,21 +627,21 @@ </div> <h2 id="_author">Author</h2> <div class="sectionbody"> -<div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org>, but somewhat -butchered by Junio C Hamano <gitster@pobox.com>. Later significantly -updated by Shawn Pearce <spearce@spearce.org>.</p></div> +<div class="paragraph"><p>Written by Linus Torvalds <<a href="mailto:torvalds@osdl.org">torvalds@osdl.org</a>>, but somewhat +butchered by Junio C Hamano <<a href="mailto:gitster@pobox.com">gitster@pobox.com</a>>. Later significantly +updated by Shawn Pearce <<a href="mailto:spearce@spearce.org">spearce@spearce.org</a>>.</p></div> </div> <h2 id="_documentation">Documentation</h2> <div class="sectionbody"> -<div class="para"><p>Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> +<div class="paragraph"><p>Documentation by David Greaves, Junio C Hamano and the git-list <<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>>.</p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> -<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:56:39 UTC +Last updated 2010-11-25 03:13:41 UTC </div> </div> </body>
diff --git a/git-describe.txt b/git-describe.txt index 7ef9d51..02e015a 100644 --- a/git-describe.txt +++ b/git-describe.txt
@@ -37,7 +37,7 @@ --all:: Instead of using only the annotated tags, use any ref found in `.git/refs/`. This option enables matching - any known branch, remote branch, or lightweight tag. + any known branch, remote-tracking branch, or lightweight tag. --tags:: Instead of using only the annotated tags, use any tag
diff --git a/git-fetch.html b/git-fetch.html index 1ab64a4..34680a6 100644 --- a/git-fetch.html +++ b/git-fetch.html
@@ -426,7 +426,7 @@ <div class="paragraph"><p>The ref names and their object names of fetched refs are stored in <tt>.git/FETCH_HEAD</tt>. This information is left for a later merge operation done by <em>git merge</em>.</p></div> -<div class="paragraph"><p>When <refspec> stores the fetched result in tracking branches, +<div class="paragraph"><p>When <refspec> stores the fetched result in remote-tracking branches, the tags that point at these branches are automatically followed. This is done by first fetching from the remote using the given <refspec>s, and if the repository has objects that are @@ -523,7 +523,7 @@ </dt> <dd> <p> - After fetching, remove any remote tracking branches which + After fetching, remove any remote-tracking branches which no longer exist on the remote. </p> </dd> @@ -994,7 +994,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-11-06 00:41:57 UTC +Last updated 2010-11-25 03:13:41 UTC </div> </div> </body>
diff --git a/git-fetch.txt b/git-fetch.txt index d159e88..c76e313 100644 --- a/git-fetch.txt +++ b/git-fetch.txt
@@ -26,7 +26,7 @@ in `.git/FETCH_HEAD`. This information is left for a later merge operation done by 'git merge'. -When <refspec> stores the fetched result in tracking branches, +When <refspec> stores the fetched result in remote-tracking branches, the tags that point at these branches are automatically followed. This is done by first fetching from the remote using the given <refspec>s, and if the repository has objects that are
diff --git a/git-gc.html b/git-gc.html index b2b5f6d..64cc9d4 100644 --- a/git-gc.html +++ b/git-gc.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>git-gc(1)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -271,7 +339,24 @@ margin-left: 6em; font-size: 0.9em; } -include1::./stylesheets/xhtml11-manpage.css[] +/* Overrides for manpage documents */ +h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +h2 { + border-style: none; +} +div.sectionbody { + margin-left: 5%; +} + +@media print { + div#toc { display: none; } +} + /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { @@ -280,6 +365,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -292,8 +378,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -304,7 +399,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>git-gc(1)</title> </head> <body> <div id="header"> @@ -318,21 +412,21 @@ </p> </div> </div> -<h2>SYNOPSIS</h2> +<h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> -<div class="para"><p><em>git gc</em> [--aggressive] [--auto] [--quiet] [--prune=<date> | --no-prune]</p></div> +<div class="paragraph"><p><em>git gc</em> [--aggressive] [--auto] [--quiet] [--prune=<date> | --no-prune]</p></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="para"><p>Runs a number of housekeeping tasks within the current repository, +<div class="paragraph"><p>Runs a number of housekeeping tasks within the current repository, such as compressing file revisions (to reduce disk space and increase performance) and removing unreachable objects which may have been created from prior invocations of <em>git add</em>.</p></div> -<div class="para"><p>Users are encouraged to run this task on a regular basis within +<div class="paragraph"><p>Users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good operating performance.</p></div> -<div class="para"><p>Some git commands may automatically run <em>git gc</em>; see the <tt>--auto</tt> flag -below for details. If you know what you're doing and all you want is to +<div class="paragraph"><p>Some git commands may automatically run <em>git gc</em>; see the <tt>--auto</tt> flag +below for details. If you know what you’re doing and all you want is to disable this behavior permanently without further considerations, just do:</p></div> <div class="listingblock"> <div class="content"> @@ -341,8 +435,8 @@ </div> <h2 id="_options">OPTIONS</h2> <div class="sectionbody"> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> --aggressive </dt> <dd> @@ -355,7 +449,7 @@ few hundred changesets or so. </p> </dd> -<dt> +<dt class="hdlist1"> --auto </dt> <dd> @@ -365,19 +459,19 @@ Some git commands run <tt>git gc --auto</tt> after performing operations that could create many loose objects. </p> -<div class="para"><p>Housekeeping is required if there are too many loose objects or +<div class="paragraph"><p>Housekeeping is required if there are too many loose objects or too many packs in the repository. If the number of loose objects exceeds the value of the <tt>gc.auto</tt> configuration variable, then all loose objects are combined into a single pack using <tt>git repack -d -l</tt>. Setting the value of <tt>gc.auto</tt> to 0 disables automatic packing of loose objects.</p></div> -<div class="para"><p>If the number of packs exceeds the value of <tt>gc.autopacklimit</tt>, +<div class="paragraph"><p>If the number of packs exceeds the value of <tt>gc.autopacklimit</tt>, then existing packs (except those marked with a <tt>.keep</tt> file) are consolidated into a single pack by using the <tt>-A</tt> option of <em>git repack</em>. Setting <tt>gc.autopacklimit</tt> to 0 disables automatic consolidation of packs.</p></div> </dd> -<dt> +<dt class="hdlist1"> --prune=<date> </dt> <dd> @@ -387,7 +481,7 @@ option is on by default. </p> </dd> -<dt> +<dt class="hdlist1"> --no-prune </dt> <dd> @@ -395,7 +489,7 @@ Do not prune any loose objects. </p> </dd> -<dt> +<dt class="hdlist1"> --quiet </dt> <dd> @@ -407,12 +501,12 @@ </div> <h2 id="_configuration">Configuration</h2> <div class="sectionbody"> -<div class="para"><p>The optional configuration variable <em>gc.reflogExpire</em> can be -set to indicate how long historical entries within each branch's +<div class="paragraph"><p>The optional configuration variable <em>gc.reflogExpire</em> can be +set to indicate how long historical entries within each branch’s reflog should remain available in this repository. The setting is expressed as a length of time, for example <em>90 days</em> or <em>3 months</em>. It defaults to <em>90 days</em>.</p></div> -<div class="para"><p>The optional configuration variable <em>gc.reflogExpireUnreachable</em> +<div class="paragraph"><p>The optional configuration variable <em>gc.reflogExpireUnreachable</em> can be set to indicate how long historical reflog entries which are not part of the current branch should remain available in this repository. These types of entries are generally created as @@ -420,8 +514,8 @@ commits prior to the amend or rebase occurring. Since these changes are not part of the current project most users will want to expire them sooner. This option defaults to <em>30 days</em>.</p></div> -<div class="para"><p>The above two configuration variables can be given to a pattern. For -example, this sets non-default expiry values only to remote tracking +<div class="paragraph"><p>The above two configuration variables can be given to a pattern. For +example, this sets non-default expiry values only to remote-tracking branches:</p></div> <div class="listingblock"> <div class="content"> @@ -429,61 +523,61 @@ reflogExpire = never reflogexpireUnreachable = 3 days</tt></pre> </div></div> -<div class="para"><p>The optional configuration variable <em>gc.rerereresolved</em> indicates +<div class="paragraph"><p>The optional configuration variable <em>gc.rerereresolved</em> indicates how long records of conflicted merge you resolved earlier are kept. This defaults to 60 days.</p></div> -<div class="para"><p>The optional configuration variable <em>gc.rerereunresolved</em> indicates +<div class="paragraph"><p>The optional configuration variable <em>gc.rerereunresolved</em> indicates how long records of conflicted merge you have not resolved are kept. This defaults to 15 days.</p></div> -<div class="para"><p>The optional configuration variable <em>gc.packrefs</em> determines if +<div class="paragraph"><p>The optional configuration variable <em>gc.packrefs</em> determines if <em>git gc</em> runs <em>git pack-refs</em>. This can be set to "nobare" to enable it within all non-bare repos or it can be set to a boolean value. This defaults to true.</p></div> -<div class="para"><p>The optional configuration variable <em>gc.aggressiveWindow</em> controls how +<div class="paragraph"><p>The optional configuration variable <em>gc.aggressiveWindow</em> controls how much time is spent optimizing the delta compression of the objects in the repository when the --aggressive option is specified. The larger the value, the more time is spent optimizing the delta compression. See the documentation for the --window' option in <a href="git-repack.html">git-repack(1)</a> for more details. This defaults to 250.</p></div> -<div class="para"><p>The optional configuration variable <em>gc.pruneExpire</em> controls how old +<div class="paragraph"><p>The optional configuration variable <em>gc.pruneExpire</em> controls how old the unreferenced loose objects have to be before they are pruned. The default is "2 weeks ago".</p></div> </div> <h2 id="_notes">Notes</h2> <div class="sectionbody"> -<div class="para"><p><em>git gc</em> tries very hard to be safe about the garbage it collects. In +<div class="paragraph"><p><em>git gc</em> tries very hard to be safe about the garbage it collects. In particular, it will keep not only objects referenced by your current set -of branches and tags, but also objects referenced by the index, remote -tracking branches, refs saved by <em>git filter-branch</em> in +of branches and tags, but also objects referenced by the index, +remote-tracking branches, refs saved by <em>git filter-branch</em> in refs/original/, or reflogs (which may reference commits in branches that were later amended or rewound).</p></div> -<div class="para"><p>If you are expecting some objects to be collected and they aren't, check +<div class="paragraph"><p>If you are expecting some objects to be collected and they aren’t, check all of those locations and decide whether it makes sense in your case to remove those references.</p></div> </div> <h2 id="_hooks">HOOKS</h2> <div class="sectionbody"> -<div class="para"><p>The <em>git gc --auto</em> command will run the <em>pre-auto-gc</em> hook. See +<div class="paragraph"><p>The <em>git gc --auto</em> command will run the <em>pre-auto-gc</em> hook. See <a href="githooks.html">githooks(5)</a> for more information.</p></div> </div> <h2 id="_see_also">SEE ALSO</h2> <div class="sectionbody"> -<div class="para"><p><a href="git-prune.html">git-prune(1)</a> +<div class="paragraph"><p><a href="git-prune.html">git-prune(1)</a> <a href="git-reflog.html">git-reflog(1)</a> <a href="git-repack.html">git-repack(1)</a> <a href="git-rerere.html">git-rerere(1)</a></p></div> </div> <h2 id="_author">Author</h2> <div class="sectionbody"> -<div class="para"><p>Written by Shawn O. Pearce <spearce@spearce.org></p></div> +<div class="paragraph"><p>Written by Shawn O. Pearce <<a href="mailto:spearce@spearce.org">spearce@spearce.org</a>></p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> -<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:56:44 UTC +Last updated 2010-11-25 03:13:41 UTC </div> </div> </body>
diff --git a/git-gc.txt b/git-gc.txt index 315f07e..801aede 100644 --- a/git-gc.txt +++ b/git-gc.txt
@@ -89,7 +89,7 @@ them sooner. This option defaults to '30 days'. The above two configuration variables can be given to a pattern. For -example, this sets non-default expiry values only to remote tracking +example, this sets non-default expiry values only to remote-tracking branches: ------------ @@ -128,8 +128,8 @@ 'git gc' tries very hard to be safe about the garbage it collects. In particular, it will keep not only objects referenced by your current set -of branches and tags, but also objects referenced by the index, remote -tracking branches, refs saved by 'git filter-branch' in +of branches and tags, but also objects referenced by the index, +remote-tracking branches, refs saved by 'git filter-branch' in refs/original/, or reflogs (which may reference commits in branches that were later amended or rewound).
diff --git a/git-log.html b/git-log.html index dac56a6..f58de67 100644 --- a/git-log.html +++ b/git-log.html
@@ -1583,7 +1583,7 @@ <p> Pretend as if all the refs in <tt>refs/remotes</tt> are listed on the command line as <em><commit></em>. If <em><pattern></em> is given, limit - remote tracking branches to ones matching given shell glob. + remote-tracking branches to ones matching given shell glob. If pattern lacks <em>?</em>, <em><strong></em>, or <em>[</em>, <em>/</strong></em> at the end is implied. </p> </dd> @@ -2805,7 +2805,7 @@ <dd> <p> Shows all commits that are in any of local branches but not in - any of remote tracking branches for <em>origin</em> (what you have that + any of remote-tracking branches for <em>origin</em> (what you have that origin doesn’t). </p> </dd> @@ -2993,7 +2993,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-11-06 00:41:57 UTC +Last updated 2010-11-25 03:13:42 UTC </div> </div> </body>
diff --git a/git-log.txt b/git-log.txt index 6d40f00..ff41784 100644 --- a/git-log.txt +++ b/git-log.txt
@@ -116,7 +116,7 @@ git log --branches --not --remotes=origin:: Shows all commits that are in any of local branches but not in - any of remote tracking branches for 'origin' (what you have that + any of remote-tracking branches for 'origin' (what you have that origin doesn't). git log master --not --remotes=*/master::
diff --git a/git-pull.html b/git-pull.html index 3093370..45d7919 100644 --- a/git-pull.html +++ b/git-pull.html
@@ -428,7 +428,7 @@ <div class="paragraph"><p><repository> should be the name of a remote repository as passed to <a href="git-fetch.html">git-fetch(1)</a>. <refspec> can name an arbitrary remote ref (for example, the name of a tag) or even -a collection of refs with corresponding remote tracking branches +a collection of refs with corresponding remote-tracking branches (e.g., refs/heads/<strong>:refs/remotes/origin/</strong>), but usually it is the name of a branch in the remote repository.</p></div> <div class="paragraph"><p>Default values for <repository> and <branch> are read from the @@ -1309,7 +1309,7 @@ and if there is not any such variable, the value on <tt>URL: ` line in `$GIT_DIR/remotes/<origin></tt> file is used.</p></div> <div class="paragraph"><p>In order to determine what remote branches to fetch (and -optionally store in the tracking branches) when the command is +optionally store in the remote-tracking branches) when the command is run without any refspec parameters on the command line, values of the configuration variable <tt>remote.<origin>.fetch</tt> are consulted, and if there aren’t any, <tt>$GIT_DIR/remotes/<origin></tt> @@ -1321,9 +1321,9 @@ <pre><tt>refs/heads/*:refs/remotes/origin/*</tt></pre> </div></div> <div class="paragraph"><p>A globbing refspec must have a non-empty RHS (i.e. must store -what were fetched in tracking branches), and its LHS and RHS +what were fetched in remote-tracking branches), and its LHS and RHS must end with <tt>/*</tt>. The above specifies that all remote -branches are tracked using tracking branches in +branches are tracked using remote-tracking branches in <tt>refs/remotes/origin/</tt> hierarchy under the same name.</p></div> <div class="paragraph"><p>The rule to determine which remote branch to merge after fetching is a bit involved, in order not to break backward @@ -1413,7 +1413,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-11-18 00:51:23 UTC +Last updated 2010-11-25 03:13:42 UTC </div> </div> </body>
diff --git a/git-pull.txt b/git-pull.txt index e1b0bd2..e47361f 100644 --- a/git-pull.txt +++ b/git-pull.txt
@@ -26,7 +26,7 @@ <repository> should be the name of a remote repository as passed to linkgit:git-fetch[1]. <refspec> can name an arbitrary remote ref (for example, the name of a tag) or even -a collection of refs with corresponding remote tracking branches +a collection of refs with corresponding remote-tracking branches (e.g., refs/heads/*:refs/remotes/origin/*), but usually it is the name of a branch in the remote repository. @@ -136,7 +136,7 @@ in `$GIT_DIR/remotes/<origin>` file is used. In order to determine what remote branches to fetch (and -optionally store in the tracking branches) when the command is +optionally store in the remote-tracking branches) when the command is run without any refspec parameters on the command line, values of the configuration variable `remote.<origin>.fetch` are consulted, and if there aren't any, `$GIT_DIR/remotes/<origin>` @@ -149,9 +149,9 @@ ------------ A globbing refspec must have a non-empty RHS (i.e. must store -what were fetched in tracking branches), and its LHS and RHS +what were fetched in remote-tracking branches), and its LHS and RHS must end with `/*`. The above specifies that all remote -branches are tracked using tracking branches in +branches are tracked using remote-tracking branches in `refs/remotes/origin/` hierarchy under the same name. The rule to determine which remote branch to merge after
diff --git a/git-remote.html b/git-remote.html index ddde44f..4a3182b 100644 --- a/git-remote.html +++ b/git-remote.html
@@ -489,7 +489,7 @@ </dt> <dd> <p> -Rename the remote named <old> to <new>. All remote tracking branches and +Rename the remote named <old> to <new>. All remote-tracking branches and configuration settings for the remote are updated. </p> <div class="paragraph"><p>In case <old> and <new> are the same, and <old> is a file under @@ -501,7 +501,7 @@ </dt> <dd> <p> -Remove the remote named <name>. All remote tracking branches and +Remove the remote named <name>. All remote-tracking branches and configuration settings for the remote are removed. </p> </dd> @@ -573,7 +573,7 @@ </dt> <dd> <p> -Deletes all stale tracking branches under <name>. +Deletes all stale remote-tracking branches under <name>. These stale branches have already been removed from the remote repository referenced by <name>, but are still locally available in "remotes/<name>". @@ -665,7 +665,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-11-06 00:41:57 UTC +Last updated 2010-11-25 03:13:42 UTC </div> </div> </body>
diff --git a/git-remote.txt b/git-remote.txt index 0d28feb..c258ea4 100644 --- a/git-remote.txt +++ b/git-remote.txt
@@ -75,7 +75,7 @@ 'rename':: -Rename the remote named <old> to <new>. All remote tracking branches and +Rename the remote named <old> to <new>. All remote-tracking branches and configuration settings for the remote are updated. + In case <old> and <new> are the same, and <old> is a file under @@ -84,7 +84,7 @@ 'rm':: -Remove the remote named <name>. All remote tracking branches and +Remove the remote named <name>. All remote-tracking branches and configuration settings for the remote are removed. 'set-head':: @@ -146,7 +146,7 @@ 'prune':: -Deletes all stale tracking branches under <name>. +Deletes all stale remote-tracking branches under <name>. These stale branches have already been removed from the remote repository referenced by <name>, but are still locally available in "remotes/<name>".
diff --git a/git-rev-list.html b/git-rev-list.html index 1741415..2198a7e 100644 --- a/git-rev-list.html +++ b/git-rev-list.html
@@ -912,7 +912,7 @@ <p> Pretend as if all the refs in <tt>refs/remotes</tt> are listed on the command line as <em><commit></em>. If <em><pattern></em> is given, limit - remote tracking branches to ones matching given shell glob. + remote-tracking branches to ones matching given shell glob. If pattern lacks <em>?</em>, <em><strong></em>, or <em>[</em>, <em>/</strong></em> at the end is implied. </p> </dd>
diff --git a/git-send-email.html b/git-send-email.html index b90e7aa..189ab4a 100644 --- a/git-send-email.html +++ b/git-send-email.html
@@ -512,12 +512,27 @@ </dt> <dd> <p> - Specify the contents of the first In-Reply-To header. - Subsequent emails will refer to the previous email - instead of this if --chain-reply-to is set. - Only necessary if --compose is also set. If --compose - is not set, this will be prompted for. + Make the first mail (or all the mails with <tt>--no-thread</tt>) appear as a + reply to the given Message-Id, which avoids breaking threads to + provide a new patch series. + The second and subsequent emails will be sent as replies according to + the <tt>--[no]-chain-reply-to</tt> setting. </p> +<div class="paragraph"><p>So for example when <tt>--thread</tt> and <tt>--no-chain-reply-to</tt> are specified, the +second and subsequent patches will be replies to the first one like in the +illustration below where <tt>[PATCH v2 0/3]</tt> is in reply to <tt>[PATCH 0/2]</tt>:</p></div> +<div class="literalblock"> +<div class="content"> +<pre><tt>[PATCH 0/2] Here is what I did... + [PATCH 1/2] Clean up and tests + [PATCH 2/2] Implementation + [PATCH v2 0/3] Here is a reroll + [PATCH v2 1/3] Clean up + [PATCH v2 2/3] New tests + [PATCH v2 3/3] Implementation</tt></pre> +</div></div> +<div class="paragraph"><p>Only necessary if --compose is also set. If --compose +is not set, this will be prompted for.</p></div> </dd> <dt class="hdlist1"> --subject=<string> @@ -980,7 +995,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-11-06 00:41:57 UTC +Last updated 2010-11-25 03:13:42 UTC </div> </div> </body>
diff --git a/git-send-email.txt b/git-send-email.txt index 05904e0..ebc024a 100644 --- a/git-send-email.txt +++ b/git-send-email.txt
@@ -82,11 +82,26 @@ set, as returned by "git var -l". --in-reply-to=<identifier>:: - Specify the contents of the first In-Reply-To header. - Subsequent emails will refer to the previous email - instead of this if --chain-reply-to is set. - Only necessary if --compose is also set. If --compose - is not set, this will be prompted for. + Make the first mail (or all the mails with `--no-thread`) appear as a + reply to the given Message-Id, which avoids breaking threads to + provide a new patch series. + The second and subsequent emails will be sent as replies according to + the `--[no]-chain-reply-to` setting. ++ +So for example when `--thread` and `--no-chain-reply-to` are specified, the +second and subsequent patches will be replies to the first one like in the +illustration below where `[PATCH v2 0/3]` is in reply to `[PATCH 0/2]`: ++ + [PATCH 0/2] Here is what I did... + [PATCH 1/2] Clean up and tests + [PATCH 2/2] Implementation + [PATCH v2 0/3] Here is a reroll + [PATCH v2 1/3] Clean up + [PATCH v2 2/3] New tests + [PATCH v2 3/3] Implementation ++ +Only necessary if --compose is also set. If --compose +is not set, this will be prompted for. --subject=<string>:: Specify the initial subject of the email thread.
diff --git a/git-tag.html b/git-tag.html index 2d924db..367b2af 100644 --- a/git-tag.html +++ b/git-tag.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>git-tag(1)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -271,7 +339,24 @@ margin-left: 6em; font-size: 0.9em; } -include1::./stylesheets/xhtml11-manpage.css[] +/* Overrides for manpage documents */ +h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +h2 { + border-style: none; +} +div.sectionbody { + margin-left: 5%; +} + +@media print { + div#toc { display: none; } +} + /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { @@ -280,6 +365,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -292,8 +378,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -304,7 +399,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>git-tag(1)</title> </head> <body> <div id="header"> @@ -318,37 +412,39 @@ </p> </div> </div> -<h2>SYNOPSIS</h2> +<h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> <div class="verseblock"> -<div class="content"><em>git tag</em> [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] +<div class="verseblock-content"><em>git tag</em> [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] <tagname> [<commit> | <object>] <em>git tag</em> -d <tagname>… <em>git tag</em> [-n[<num>]] -l [--contains <commit>] [<pattern>] -<em>git tag</em> -v <tagname>…</div></div> +<em>git tag</em> -v <tagname>…</div> +<div class="verseblock-attribution"> +</div></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="para"><p>Adds a tag reference in <tt>.git/refs/tags/</tt>.</p></div> -<div class="para"><p>Unless <tt>-f</tt> is given, the tag must not yet exist in +<div class="paragraph"><p>Adds a tag reference in <tt>.git/refs/tags/</tt>.</p></div> +<div class="paragraph"><p>Unless <tt>-f</tt> is given, the tag must not yet exist in <tt>.git/refs/tags/</tt> directory.</p></div> -<div class="para"><p>If one of <tt>-a</tt>, <tt>-s</tt>, or <tt>-u <key-id></tt> is passed, the command +<div class="paragraph"><p>If one of <tt>-a</tt>, <tt>-s</tt>, or <tt>-u <key-id></tt> is passed, the command creates a <em>tag</em> object, and requires the tag message. Unless <tt>-m <msg></tt> or <tt>-F <file></tt> is given, an editor is started for the user to type in the tag message.</p></div> -<div class="para"><p>If <tt>-m <msg></tt> or <tt>-F <file></tt> is given and <tt>-a</tt>, <tt>-s</tt>, and <tt>-u <key-id></tt> +<div class="paragraph"><p>If <tt>-m <msg></tt> or <tt>-F <file></tt> is given and <tt>-a</tt>, <tt>-s</tt>, and <tt>-u <key-id></tt> are absent, <tt>-a</tt> is implied.</p></div> -<div class="para"><p>Otherwise just the SHA1 object name of the commit object is +<div class="paragraph"><p>Otherwise just the SHA1 object name of the commit object is written (i.e. a lightweight tag).</p></div> -<div class="para"><p>A GnuPG signed tag object will be created when <tt>-s</tt> or <tt>-u +<div class="paragraph"><p>A GnuPG signed tag object will be created when <tt>-s</tt> or <tt>-u <key-id></tt> is used. When <tt>-u <key-id></tt> is not used, the committer identity for the current user is used to find the GnuPG key for signing.</p></div> </div> <h2 id="_options">OPTIONS</h2> <div class="sectionbody"> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> -a </dt> <dd> @@ -356,15 +452,15 @@ Make an unsigned, annotated tag object </p> </dd> -<dt> +<dt class="hdlist1"> -s </dt> <dd> <p> - Make a GPG-signed tag, using the default e-mail address's key + Make a GPG-signed tag, using the default e-mail address’s key </p> </dd> -<dt> +<dt class="hdlist1"> -u <key-id> </dt> <dd> @@ -372,10 +468,10 @@ Make a GPG-signed tag, using the given key </p> </dd> -<dt> +<dt class="hdlist1"> -f </dt> -<dt> +<dt class="hdlist1"> --force </dt> <dd> @@ -383,7 +479,7 @@ Replace an existing tag with the given name (instead of failing) </p> </dd> -<dt> +<dt class="hdlist1"> -d </dt> <dd> @@ -391,7 +487,7 @@ Delete existing tags with the given names. </p> </dd> -<dt> +<dt class="hdlist1"> -v </dt> <dd> @@ -399,7 +495,7 @@ Verify the gpg signature of the given tag names. </p> </dd> -<dt> +<dt class="hdlist1"> -n<num> </dt> <dd> @@ -411,7 +507,7 @@ If the tag is not annotated, the commit message is displayed instead. </p> </dd> -<dt> +<dt class="hdlist1"> -l <pattern> </dt> <dd> @@ -420,7 +516,7 @@ Typing "git tag" without arguments, also lists all tags. </p> </dd> -<dt> +<dt class="hdlist1"> --contains <commit> </dt> <dd> @@ -428,7 +524,7 @@ Only list tags which contain the specified commit. </p> </dd> -<dt> +<dt class="hdlist1"> -m <msg> </dt> <dd> @@ -440,7 +536,7 @@ is given. </p> </dd> -<dt> +<dt class="hdlist1"> -F <file> </dt> <dd> @@ -451,7 +547,7 @@ is given. </p> </dd> -<dt> +<dt class="hdlist1"> <tagname> </dt> <dd> @@ -466,8 +562,8 @@ </div> <h2 id="_configuration">CONFIGURATION</h2> <div class="sectionbody"> -<div class="para"><p>By default, <em>git tag</em> in sign-with-default mode (-s) will use your -committer identity (of the form "Your Name <your@email.address>") to +<div class="paragraph"><p>By default, <em>git tag</em> in sign-with-default mode (-s) will use your +committer identity (of the form "Your Name <<a href="mailto:your@email.address">your@email.address</a>>") to find a key. If you want to use a different default key, you can specify it in the repository configuration as follows:</p></div> <div class="listingblock"> @@ -479,14 +575,14 @@ <h2 id="_discussion">DISCUSSION</h2> <div class="sectionbody"> <h3 id="_on_re_tagging">On Re-tagging</h3><div style="clear:left"></div> -<div class="para"><p>What should you do when you tag a wrong commit and you would +<div class="paragraph"><p>What should you do when you tag a wrong commit and you would want to re-tag?</p></div> -<div class="para"><p>If you never pushed anything out, just re-tag it. Use "-f" to -replace the old one. And you're done.</p></div> -<div class="para"><p>But if you have pushed things out (or others could just read +<div class="paragraph"><p>If you never pushed anything out, just re-tag it. Use "-f" to +replace the old one. And you’re done.</p></div> +<div class="paragraph"><p>But if you have pushed things out (or others could just read your repository directly), then others will have already seen the old tag. In that case you can do one of two things:</p></div> -<div class="olist"><ol> +<div class="olist arabic"><ol class="arabic"> <li> <p> The sane thing. @@ -502,15 +598,15 @@ The insane thing. You really want to call the new version "X" too, <em>even though</em> others have already seen the old one. So just use <em>git tag -f</em> -again, as if you hadn't already published the old one. +again, as if you hadn’t already published the old one. </p> </li> </ol></div> -<div class="para"><p>However, Git does <strong>not</strong> (and it should not) change tags behind +<div class="paragraph"><p>However, Git does <strong>not</strong> (and it should not) change tags behind users back. So if somebody already got the old tag, doing a -<em>git pull</em> on your tree shouldn't just make them overwrite the old +<em>git pull</em> on your tree shouldn’t just make them overwrite the old one.</p></div> -<div class="para"><p>If somebody got a release tag from you, you cannot just change +<div class="paragraph"><p>If somebody got a release tag from you, you cannot just change the tag for them by updating your own one. This is a big security issue, in that people MUST be able to trust their tag-names. If you really want to do the insane thing, you need @@ -537,22 +633,22 @@ Sorry for inconvenience.</tt></pre> </div></div> -<div class="para"><p>Does this seem a bit complicated? It <strong>should</strong> be. There is no +<div class="paragraph"><p>Does this seem a bit complicated? It <strong>should</strong> be. There is no way that it would be correct to just "fix" it behind peoples backs. People need to know that their tags might have been changed.</p></div> <h3 id="_on_automatic_following">On Automatic following</h3><div style="clear:left"></div> -<div class="para"><p>If you are following somebody else's tree, you are most likely -using tracking branches (<tt>refs/heads/origin</tt> in traditional +<div class="paragraph"><p>If you are following somebody else’s tree, you are most likely +using remote-tracking branches (<tt>refs/heads/origin</tt> in traditional layout, or <tt>refs/remotes/origin/master</tt> in the separate-remote layout). You usually want the tags from the other end.</p></div> -<div class="para"><p>On the other hand, if you are fetching because you would want a +<div class="paragraph"><p>On the other hand, if you are fetching because you would want a one-shot merge from somebody else, you typically do not want to get tags from there. This happens more often for people near the toplevel but not limited to them. Mere mortals when pulling from each other do not necessarily want to automatically get private anchor point tags from the other person.</p></div> -<div class="para"><p>You would notice "please pull" messages on the mailing list says +<div class="paragraph"><p>You would notice "please pull" messages on the mailing list says repo URL and branch name alone. This is designed to be easily cut&pasted to a <em>git fetch</em> command line:</p></div> <div class="listingblock"> @@ -563,21 +659,21 @@ to get the following updates...</tt></pre> </div></div> -<div class="para"><p>becomes:</p></div> +<div class="paragraph"><p>becomes:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git pull git://git..../proj.git master</tt></pre> </div></div> -<div class="para"><p>In such a case, you do not want to automatically follow other's +<div class="paragraph"><p>In such a case, you do not want to automatically follow other’s tags.</p></div> -<div class="para"><p>One important aspect of git is it is distributed, and being +<div class="paragraph"><p>One important aspect of git is it is distributed, and being distributed largely means there is no inherent "upstream" or "downstream" in the system. On the face of it, the above example might seem to indicate that the tag namespace is owned by upper echelon of people and tags only flow downwards, but that is not the case. It only shows that the usage pattern determines who are interested in whose tags.</p></div> -<div class="para"><p>A one-shot pull is a sign that a commit history is now crossing +<div class="paragraph"><p>A one-shot pull is a sign that a commit history is now crossing the boundary between one circle of people (e.g. "people who are primarily interested in the networking part of the kernel") who may have their own set of tags (e.g. "this is the third release @@ -588,22 +684,22 @@ internally in the former group (that is what "internal" means). That is why it is desirable not to follow tags automatically in this case.</p></div> -<div class="para"><p>It may well be that among networking people, they may want to +<div class="paragraph"><p>It may well be that among networking people, they may want to exchange the tags internal to their group, but in that workflow -they are most likely tracking with each other's progress by -having tracking branches. Again, the heuristic to automatically +they are most likely tracking with each other’s progress by +having remote-tracking branches. Again, the heuristic to automatically follow such tags is a good thing.</p></div> <h3 id="_on_backdating_tags">On Backdating Tags</h3><div style="clear:left"></div> -<div class="para"><p>If you have imported some changes from another VCS and would like +<div class="paragraph"><p>If you have imported some changes from another VCS and would like to add tags for major releases of your work, it is useful to be able to specify the date to embed inside of the tag object. The data in the tag object affects, for example, the ordering of tags in the gitweb interface.</p></div> -<div class="para"><p>To set the date used in future tag objects, set the environment +<div class="paragraph"><p>To set the date used in future tag objects, set the environment variable GIT_COMMITTER_DATE to one or more of the date and time. The date and time can be specified in a number of ways; the most common is "YYYY-MM-DD HH:MM".</p></div> -<div class="para"><p>An example follows.</p></div> +<div class="paragraph"><p>An example follows.</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ GIT_COMMITTER_DATE="2006-10-02 10:31" git tag -s v1.0.1</tt></pre> @@ -611,24 +707,24 @@ </div> <h2 id="_see_also">SEE ALSO</h2> <div class="sectionbody"> -<div class="para"><p><a href="git-check-ref-format.html">git-check-ref-format(1)</a>.</p></div> +<div class="paragraph"><p><a href="git-check-ref-format.html">git-check-ref-format(1)</a>.</p></div> </div> <h2 id="_author">Author</h2> <div class="sectionbody"> -<div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org>, -Junio C Hamano <gitster@pobox.com> and Chris Wright <chrisw@osdl.org>.</p></div> +<div class="paragraph"><p>Written by Linus Torvalds <<a href="mailto:torvalds@osdl.org">torvalds@osdl.org</a>>, +Junio C Hamano <<a href="mailto:gitster@pobox.com">gitster@pobox.com</a>> and Chris Wright <<a href="mailto:chrisw@osdl.org">chrisw@osdl.org</a>>.</p></div> </div> <h2 id="_documentation">Documentation</h2> <div class="sectionbody"> -<div class="para"><p>Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> +<div class="paragraph"><p>Documentation by David Greaves, Junio C Hamano and the git-list <<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>>.</p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> -<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:57:00 UTC +Last updated 2010-11-25 03:13:43 UTC </div> </div> </body>
diff --git a/git-tag.txt b/git-tag.txt index 31c78a8..8b169e3 100644 --- a/git-tag.txt +++ b/git-tag.txt
@@ -177,7 +177,7 @@ ~~~~~~~~~~~~~~~~~~~~~~ If you are following somebody else's tree, you are most likely -using tracking branches (`refs/heads/origin` in traditional +using remote-tracking branches (`refs/heads/origin` in traditional layout, or `refs/remotes/origin/master` in the separate-remote layout). You usually want the tags from the other end. @@ -232,7 +232,7 @@ It may well be that among networking people, they may want to exchange the tags internal to their group, but in that workflow they are most likely tracking with each other's progress by -having tracking branches. Again, the heuristic to automatically +having remote-tracking branches. Again, the heuristic to automatically follow such tags is a good thing.
diff --git a/git-verify-tag.html b/git-verify-tag.html index 6fae25e..4db96a2 100644 --- a/git-verify-tag.html +++ b/git-verify-tag.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>git-verify-tag(1)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -271,7 +339,24 @@ margin-left: 6em; font-size: 0.9em; } -include1::./stylesheets/xhtml11-manpage.css[] +/* Overrides for manpage documents */ +h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +h2 { + border-style: none; +} +div.sectionbody { + margin-left: 5%; +} + +@media print { + div#toc { display: none; } +} + /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { @@ -280,6 +365,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -292,8 +378,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -304,7 +399,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>git-verify-tag(1)</title> </head> <body> <div id="header"> @@ -318,18 +412,29 @@ </p> </div> </div> -<h2>SYNOPSIS</h2> +<h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> -<div class="para"><p><em>git verify-tag</em> <tag>…</p></div> +<div class="paragraph"><p><em>git verify-tag</em> <tag>…</p></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="para"><p>Validates the gpg signature created by <em>git tag</em>.</p></div> +<div class="paragraph"><p>Validates the gpg signature created by <em>git tag</em>.</p></div> </div> <h2 id="_options">OPTIONS</h2> <div class="sectionbody"> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> +-v +</dt> +<dt class="hdlist1"> +--verbose +</dt> +<dd> +<p> + Print the contents of the tag object before validating it. +</p> +</dd> +<dt class="hdlist1"> <tag>… </dt> <dd> @@ -341,19 +446,19 @@ </div> <h2 id="_author">Author</h2> <div class="sectionbody"> -<div class="para"><p>Written by Jan Harkes <jaharkes@cs.cmu.edu> and Eric W. Biederman <ebiederm@xmission.com></p></div> +<div class="paragraph"><p>Written by Jan Harkes <<a href="mailto:jaharkes@cs.cmu.edu">jaharkes@cs.cmu.edu</a>> and Eric W. Biederman <<a href="mailto:ebiederm@xmission.com">ebiederm@xmission.com</a>></p></div> </div> <h2 id="_documentation">Documentation</h2> <div class="sectionbody"> -<div class="para"><p>Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> +<div class="paragraph"><p>Documentation by Junio C Hamano and the git-list <<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>>.</p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> -<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:57:02 UTC +Last updated 2010-11-25 03:13:43 UTC </div> </div> </body>
diff --git a/git-verify-tag.txt b/git-verify-tag.txt index dada212..7112197 100644 --- a/git-verify-tag.txt +++ b/git-verify-tag.txt
@@ -15,6 +15,10 @@ OPTIONS ------- +-v:: +--verbose:: + Print the contents of the tag object before validating it. + <tag>...:: SHA1 identifiers of git tag objects.
diff --git a/gitglossary.html b/gitglossary.html index e7dc7ac..6136968 100644 --- a/gitglossary.html +++ b/gitglossary.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>gitglossary(7)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -271,7 +339,24 @@ margin-left: 6em; font-size: 0.9em; } -include1::./stylesheets/xhtml11-manpage.css[] +/* Overrides for manpage documents */ +h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +h2 { + border-style: none; +} +div.sectionbody { + margin-left: 5%; +} + +@media print { + div#toc { display: none; } +} + /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { @@ -280,6 +365,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -292,8 +378,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -304,7 +399,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>gitglossary(7)</title> </head> <body> <div id="header"> @@ -318,14 +412,14 @@ </p> </div> </div> -<h2>SYNOPSIS</h2> +<h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> -<div class="para"><p>*</p></div> +<div class="paragraph"><p>*</p></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> <a id="def_alternate_object_database"></a>alternate object database </dt> <dd> @@ -335,7 +429,7 @@ from another object database, which is called "alternate". </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_bare_repository"></a>bare repository </dt> <dd> @@ -351,7 +445,7 @@ public repositories make bare repositories available. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_blob_object"></a>blob object </dt> <dd> @@ -359,7 +453,7 @@ Untyped <a href="#def_object">object</a>, e.g. the contents of a file. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_branch"></a>branch </dt> <dd> @@ -375,7 +469,7 @@ branch), and <a href="#def_HEAD">HEAD</a> points to that branch. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_cache"></a>cache </dt> <dd> @@ -383,7 +477,7 @@ Obsolete for: <a href="#def_index">index</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_chain"></a>chain </dt> <dd> @@ -393,7 +487,7 @@ <a href="#def_commit">commit</a> could be one of its <a href="#def_parent">parents</a>). </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_changeset"></a>changeset </dt> <dd> @@ -403,7 +497,7 @@ "changesets" with git. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_checkout"></a>checkout </dt> <dd> @@ -416,7 +510,7 @@ been pointed at a new <a href="#def_branch">branch</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_cherry-picking"></a>cherry-picking </dt> <dd> @@ -429,7 +523,7 @@ of the current <a href="#def_branch">branch</a> as a new commit. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_clean"></a>clean </dt> <dd> @@ -439,7 +533,7 @@ <a href="#def_head">head</a>. Also see "<a href="#def_dirty">dirty</a>". </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_commit"></a>commit </dt> <dd> @@ -451,12 +545,12 @@ use the words "revision" or "version". Also used as a short hand for <a href="#def_commit_object">commit object</a>. </p> -<div class="para"><p>As a verb: The action of storing a new snapshot of the project's +<div class="paragraph"><p>As a verb: The action of storing a new snapshot of the project’s state in the git history, by creating a new commit representing the current state of the <a href="#def_index">index</a> and advancing <a href="#def_HEAD">HEAD</a> to point at the new commit.</p></div> </dd> -<dt> +<dt class="hdlist1"> <a id="def_commit_object"></a>commit object </dt> <dd> @@ -468,7 +562,7 @@ revision. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_core_git"></a>core git </dt> <dd> @@ -477,7 +571,7 @@ source code management tools. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_DAG"></a>DAG </dt> <dd> @@ -488,7 +582,7 @@ which begins and ends with the same <a href="#def_object">object</a>). </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_dangling_object"></a>dangling object </dt> <dd> @@ -499,18 +593,18 @@ reference or <a href="#def_object">object</a> in the <a href="#def_repository">repository</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_detached_HEAD"></a>detached HEAD </dt> <dd> <p> Normally the <a href="#def_HEAD">HEAD</a> stores the name of a <a href="#def_branch">branch</a>. However, git also allows you to <a href="#def_checkout">check out</a> - an arbitrary <a href="#def_commit">commit</a> that isn't necessarily the tip of any + an arbitrary <a href="#def_commit">commit</a> that isn’t necessarily the tip of any particular branch. In this case HEAD is said to be "detached". </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_dircache"></a>dircache </dt> <dd> @@ -518,7 +612,7 @@ You are <strong>waaaaay</strong> behind. See <a href="#def_index">index</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_directory"></a>directory </dt> <dd> @@ -526,7 +620,7 @@ The list you get with "ls" :-) </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_dirty"></a>dirty </dt> <dd> @@ -536,7 +630,7 @@ <a href="#def_branch">branch</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_ent"></a>ent </dt> <dd> @@ -546,7 +640,7 @@ explanation. Avoid this term, not to confuse people. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_evil_merge"></a>evil merge </dt> <dd> @@ -555,7 +649,7 @@ do not appear in any <a href="#def_parent">parent</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_fast_forward"></a>fast-forward </dt> <dd> @@ -566,23 +660,23 @@ you have. In such these cases, you do not make a new <a href="#def_merge">merge</a> <a href="#def_commit">commit</a> but instead just update to his revision. This will happen frequently on a - <a href="#def_tracking_branch">tracking branch</a> of a remote + <a href="#def_remote_tracking_branch">remote-tracking branch</a> of a remote <a href="#def_repository">repository</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_fetch"></a>fetch </dt> <dd> <p> Fetching a <a href="#def_branch">branch</a> means to get the - branch's <a href="#def_head_ref">head ref</a> from a remote + branch’s <a href="#def_head_ref">head ref</a> from a remote <a href="#def_repository">repository</a>, to find out which objects are missing from the local <a href="#def_object_database">object database</a>, and to get them, too. See also <a href="git-fetch.html">git-fetch(1)</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_file_system"></a>file system </dt> <dd> @@ -592,7 +686,7 @@ efficiency and speed of git. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_git_archive"></a>git archive </dt> <dd> @@ -600,7 +694,7 @@ Synonym for <a href="#def_repository">repository</a> (for arch people). </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_grafts"></a>grafts </dt> <dd> @@ -612,15 +706,15 @@ created. Configured via the <tt>.git/info/grafts</tt> file. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_hash"></a>hash </dt> <dd> <p> - In git's context, synonym to <a href="#def_object_name">object name</a>. + In git’s context, synonym to <a href="#def_object_name">object name</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_head"></a>head </dt> <dd> @@ -631,7 +725,7 @@ <a href="git-pack-refs.html">git-pack-refs(1)</a>.) </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_HEAD"></a>HEAD </dt> <dd> @@ -643,7 +737,7 @@ reference an arbitrary commit. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_head_ref"></a>head ref </dt> <dd> @@ -651,7 +745,7 @@ A synonym for <a href="#def_head">head</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_hook"></a>hook </dt> <dd> @@ -666,7 +760,7 @@ of git you had to make them executable. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_index"></a>index </dt> <dd> @@ -678,7 +772,7 @@ when <a href="#def_merge">merging</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_index_entry"></a>index entry </dt> <dd> @@ -689,7 +783,7 @@ the index contains multiple versions of that file). </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_master"></a>master </dt> <dd> @@ -701,7 +795,7 @@ purely by convention and is not required. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_merge"></a>merge </dt> <dd> @@ -719,14 +813,14 @@ conflict, manual intervention may be required to complete the merge. </p> -<div class="para"><p>As a noun: unless it is a <a href="#def_fast_forward">fast-forward</a>, a +<div class="paragraph"><p>As a noun: unless it is a <a href="#def_fast_forward">fast-forward</a>, a successful merge results in the creation of a new <a href="#def_commit">commit</a> representing the result of the merge, and having as <a href="#def_parent">parents</a> the tips of the merged <a href="#def_branch">branches</a>. This commit is referred to as a "merge commit", or sometimes just a "merge".</p></div> </dd> -<dt> +<dt class="hdlist1"> <a id="def_object"></a>object </dt> <dd> @@ -736,7 +830,7 @@ object can not be changed. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_object_database"></a>object database </dt> <dd> @@ -746,7 +840,7 @@ live in <tt>$GIT_DIR/objects/</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_object_identifier"></a>object identifier </dt> <dd> @@ -754,18 +848,18 @@ Synonym for <a href="#def_object_name">object name</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_object_name"></a>object name </dt> <dd> <p> The unique identifier of an <a href="#def_object">object</a>. The <a href="#def_hash">hash</a> - of the object's contents using the Secure Hash Algorithm + of the object’s contents using the Secure Hash Algorithm 1 and usually represented by the 40 character hexadecimal encoding of the <a href="#def_hash">hash</a> of the object. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_object_type"></a>object type </dt> <dd> @@ -776,7 +870,7 @@ <a href="#def_object">object</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_octopus"></a>octopus </dt> <dd> @@ -785,7 +879,7 @@ intelligent predator. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_origin"></a>origin </dt> <dd> @@ -793,12 +887,12 @@ The default upstream <a href="#def_repository">repository</a>. Most projects have at least one upstream project which they track. By default <em>origin</em> is used for that purpose. New upstream updates - will be fetched into remote <a href="#def_tracking_branch">tracking branches</a> named + will be fetched into remote <a href="#def_remote_tracking_branch">remote-tracking branches</a> named origin/name-of-upstream-branch, which you can see using <tt>git branch -r</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_pack"></a>pack </dt> <dd> @@ -807,7 +901,7 @@ or to transmit them efficiently). </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_pack_index"></a>pack index </dt> <dd> @@ -817,7 +911,7 @@ pack. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_parent"></a>parent </dt> <dd> @@ -827,7 +921,7 @@ parents. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_pickaxe"></a>pickaxe </dt> <dd> @@ -839,7 +933,7 @@ particular line of text. See <a href="git-diff.html">git-diff(1)</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_plumbing"></a>plumbing </dt> <dd> @@ -847,7 +941,7 @@ Cute name for <a href="#def_core_git">core git</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_porcelain"></a>porcelain </dt> <dd> @@ -858,7 +952,7 @@ interface than the <a href="#def_plumbing">plumbing</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_pull"></a>pull </dt> <dd> @@ -867,14 +961,14 @@ <a href="#def_merge">merge</a> it. See also <a href="git-pull.html">git-pull(1)</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_push"></a>push </dt> <dd> <p> - Pushing a <a href="#def_branch">branch</a> means to get the branch's + Pushing a <a href="#def_branch">branch</a> means to get the branch’s <a href="#def_head_ref">head ref</a> from a remote <a href="#def_repository">repository</a>, - find out if it is a direct ancestor to the branch's local + find out if it is a direct ancestor to the branch’s local head ref, and in that case, putting all objects, which are <a href="#def_reachable">reachable</a> from the local head ref, and which are missing from the remote @@ -884,7 +978,7 @@ ancestor to the local head, the push fails. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_reachable"></a>reachable </dt> <dd> @@ -899,7 +993,7 @@ that they contain. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_rebase"></a>rebase </dt> <dd> @@ -909,7 +1003,7 @@ to the result. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_ref"></a>ref </dt> <dd> @@ -919,18 +1013,18 @@ <tt>$GIT_DIR/refs/</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_reflog"></a>reflog </dt> <dd> <p> A reflog shows the local "history" of a ref. In other words, - it can tell you what the 3rd last revision in _this_ repository - was, and what was the current state in _this_ repository, + it can tell you what the 3rd last revision in <em>this</em> repository + was, and what was the current state in <em>this</em> repository, yesterday 9:14pm. See <a href="git-reflog.html">git-reflog(1)</a> for details. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_refspec"></a>refspec </dt> <dd> @@ -948,7 +1042,20 @@ <a href="git-push.html">git-push(1)</a>. </p> </dd> -<dt> +<dt class="hdlist1"> +<a id="def_remote_tracking_branch"></a>remote-tracking branch +</dt> +<dd> +<p> + A regular git <a href="#def_branch">branch</a> that is used to follow changes from + another <a href="#def_repository">repository</a>. A remote-tracking + branch should not contain direct modifications or have local commits + made to it. A remote-tracking branch can usually be + identified as the right-hand-side <a href="#def_ref">ref</a> in a Pull: + <a href="#def_refspec">refspec</a>. +</p> +</dd> +<dt class="hdlist1"> <a id="def_repository"></a>repository </dt> <dd> @@ -961,7 +1068,7 @@ via <a href="#def_alternate_object_database">alternates mechanism</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_resolve"></a>resolve </dt> <dd> @@ -970,7 +1077,7 @@ <a href="#def_merge">merge</a> left behind. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_revision"></a>revision </dt> <dd> @@ -980,7 +1087,7 @@ <a href="#def_commit_object">commit object</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_rewind"></a>rewind </dt> <dd> @@ -989,7 +1096,7 @@ <a href="#def_head">head</a> to an earlier <a href="#def_revision">revision</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_SCM"></a>SCM </dt> <dd> @@ -997,7 +1104,7 @@ Source code management (tool). </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_SHA1"></a>SHA1 </dt> <dd> @@ -1005,7 +1112,7 @@ Synonym for <a href="#def_object_name">object name</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_shallow_repository"></a>shallow repository </dt> <dd> @@ -1020,7 +1127,7 @@ its history can be later deepened with <a href="git-fetch.html">git-fetch(1)</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_symref"></a>symref </dt> <dd> @@ -1033,7 +1140,7 @@ command. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_tag"></a>tag </dt> <dd> @@ -1043,12 +1150,12 @@ a tag is not changed by a <a href="#def_commit">commit</a>. Tags (not <a href="#def_tag_object">tag objects</a>) are stored in <tt>$GIT_DIR/refs/tags/</tt>. A git tag has nothing to do with a Lisp tag (which would be - called an <a href="#def_object_type">object type</a> in git's context). A + called an <a href="#def_object_type">object type</a> in git’s context). A tag is most typically used to mark a particular point in the commit ancestry <a href="#def_chain">chain</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_tag_object"></a>tag object </dt> <dd> @@ -1059,7 +1166,7 @@ signature, in which case it is called a "signed tag object". </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_topic_branch"></a>topic branch </dt> <dd> @@ -1071,20 +1178,7 @@ related changes. </p> </dd> -<dt> -<a id="def_tracking_branch"></a>tracking branch -</dt> -<dd> -<p> - A regular git <a href="#def_branch">branch</a> that is used to follow changes from - another <a href="#def_repository">repository</a>. A tracking - branch should not contain direct modifications or have local commits - made to it. A tracking branch can usually be - identified as the right-hand-side <a href="#def_ref">ref</a> in a Pull: - <a href="#def_refspec">refspec</a>. -</p> -</dd> -<dt> +<dt class="hdlist1"> <a id="def_tree"></a>tree </dt> <dd> @@ -1093,7 +1187,7 @@ (i.e. a stored representation of a working tree). </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_tree_object"></a>tree object </dt> <dd> @@ -1103,7 +1197,7 @@ <a href="#def_tree">tree</a> is equivalent to a <a href="#def_directory">directory</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_tree-ish"></a>tree-ish </dt> <dd> @@ -1111,7 +1205,7 @@ A <a href="#def_ref">ref</a> pointing to either a <a href="#def_commit_object">commit object</a>, a <a href="#def_tree_object">tree object</a>, or a <a href="#def_tag_object">tag object</a> pointing to a tag or commit or tree object. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_unmerged_index"></a>unmerged index </dt> <dd> @@ -1120,7 +1214,7 @@ <a href="#def_index_entry">index entries</a>. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_unreachable_object"></a>unreachable object </dt> <dd> @@ -1129,7 +1223,7 @@ <a href="#def_branch">branch</a>, <a href="#def_tag">tag</a>, or any other reference. </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_upstream_branch"></a>upstream branch </dt> <dd> @@ -1140,13 +1234,13 @@ of <em>A</em> is <em>origin/B</em> sometimes we say "<em>A</em> is tracking <em>origin/B</em>". </p> </dd> -<dt> +<dt class="hdlist1"> <a id="def_working_tree"></a>working tree </dt> <dd> <p> The tree of actual checked out files. The working tree normally - contains the contents of the <a href="#def_HEAD">HEAD</a> commit's tree, + contains the contents of the <a href="#def_HEAD">HEAD</a> commit’s tree, plus any local changes that you have made but not yet committed. </p> </dd> @@ -1154,19 +1248,19 @@ </div> <h2 id="_see_also">SEE ALSO</h2> <div class="sectionbody"> -<div class="para"><p><a href="gittutorial.html">gittutorial(7)</a>, +<div class="paragraph"><p><a href="gittutorial.html">gittutorial(7)</a>, <a href="gittutorial-2.html">gittutorial-2(7)</a>, <a href="gitcvs-migration.html">gitcvs-migration(7)</a>, <a href="everyday.html">Everyday git</a>, -<a href="user-manual.html">The Git User's Manual</a></p></div> +<a href="user-manual.html">The Git User’s Manual</a></p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> -<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite.</p></div> +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite.</p></div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:57:05 UTC +Last updated 2008-11-15 08:07:36 UTC </div> </div> </body>
diff --git a/gittutorial-2.html b/gittutorial-2.html index 1ceb9d9..e1405e1 100644 --- a/gittutorial-2.html +++ b/gittutorial-2.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>gittutorial-2(7)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -271,7 +339,24 @@ margin-left: 6em; font-size: 0.9em; } -include1::./stylesheets/xhtml11-manpage.css[] +/* Overrides for manpage documents */ +h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +h2 { + border-style: none; +} +div.sectionbody { + margin-left: 5%; +} + +@media print { + div#toc { display: none; } +} + /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { @@ -280,6 +365,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -292,8 +378,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -304,7 +399,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>gittutorial-2(7)</title> </head> <body> <div id="header"> @@ -318,21 +412,21 @@ </p> </div> </div> -<h2>SYNOPSIS</h2> +<h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> -<div class="para"><p>git *</p></div> +<div class="paragraph"><p>git *</p></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="para"><p>You should work through <a href="gittutorial.html">gittutorial(7)</a> before reading this tutorial.</p></div> -<div class="para"><p>The goal of this tutorial is to introduce two fundamental pieces of -git's architecture--the object database and the index file--and to +<div class="paragraph"><p>You should work through <a href="gittutorial.html">gittutorial(7)</a> before reading this tutorial.</p></div> +<div class="paragraph"><p>The goal of this tutorial is to introduce two fundamental pieces of +git’s architecture—the object database and the index file—and to provide the reader with everything necessary to understand the rest of the git documentation.</p></div> </div> <h2 id="_the_git_object_database">The git object database</h2> <div class="sectionbody"> -<div class="para"><p>Let's start a new project and create a small amount of history:</p></div> +<div class="paragraph"><p>Let’s start a new project and create a small amount of history:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ mkdir test-project @@ -350,23 +444,23 @@ [master c4d59f3] add emphasis 1 files changed, 1 insertions(+), 1 deletions(-)</tt></pre> </div></div> -<div class="para"><p>What are the 7 digits of hex that git responded to the commit with?</p></div> -<div class="para"><p>We saw in part one of the tutorial that commits have names like this. +<div class="paragraph"><p>What are the 7 digits of hex that git responded to the commit with?</p></div> +<div class="paragraph"><p>We saw in part one of the tutorial that commits have names like this. It turns out that every object in the git history is stored under -a 40-digit hex name. That name is the SHA1 hash of the object's +a 40-digit hex name. That name is the SHA1 hash of the object’s contents; among other things, this ensures that git will never store the same data twice (since identical data is given an identical SHA1 name), and that the contents of a git object will never change (since -that would change the object's name as well). The 7 char hex strings +that would change the object’s name as well). The 7 char hex strings here are simply the abbreviation of such 40 character long strings. Abbreviations can be used everywhere where the 40 character strings can be used, so long as they are unambiguous.</p></div> -<div class="para"><p>It is expected that the content of the commit object you created while +<div class="paragraph"><p>It is expected that the content of the commit object you created while following the example above generates a different SHA1 hash than the one shown above because the commit object records the time when it was created and the name of the person performing the commit.</p></div> -<div class="para"><p>We can ask git about this particular object with the <tt>cat-file</tt> -command. Don't copy the 40 hex digits from this example but use those +<div class="paragraph"><p>We can ask git about this particular object with the <tt>cat-file</tt> +command. Don’t copy the 40 hex digits from this example but use those from your own version. Note that you can shorten it to only a few characters to save yourself typing all 40 hex digits:</p></div> <div class="listingblock"> @@ -380,7 +474,7 @@ initial commit</tt></pre> </div></div> -<div class="para"><p>A tree can refer to one or more "blob" objects, each corresponding to +<div class="paragraph"><p>A tree can refer to one or more "blob" objects, each corresponding to a file. In addition, a tree can also refer to other tree objects, thus creating a directory hierarchy. You can examine the contents of any tree using ls-tree (remember that a long enough initial portion @@ -390,23 +484,23 @@ <pre><tt>$ git ls-tree 92b8b694 100644 blob 3b18e512dba79e4c8300dd08aeb37f8e728b8dad file.txt</tt></pre> </div></div> -<div class="para"><p>Thus we see that this tree has one file in it. The SHA1 hash is a -reference to that file's data:</p></div> +<div class="paragraph"><p>Thus we see that this tree has one file in it. The SHA1 hash is a +reference to that file’s data:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git cat-file -t 3b18e512 blob</tt></pre> </div></div> -<div class="para"><p>A "blob" is just file data, which we can also examine with cat-file:</p></div> +<div class="paragraph"><p>A "blob" is just file data, which we can also examine with cat-file:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git cat-file blob 3b18e512 hello world</tt></pre> </div></div> -<div class="para"><p>Note that this is the old file data; so the object that git named in +<div class="paragraph"><p>Note that this is the old file data; so the object that git named in its response to the initial tree was a tree with a snapshot of the directory state that was recorded by the first commit.</p></div> -<div class="para"><p>All of these objects are stored under their SHA1 names inside the git +<div class="paragraph"><p>All of these objects are stored under their SHA1 names inside the git directory:</p></div> <div class="listingblock"> <div class="content"> @@ -427,17 +521,17 @@ .git/objects/c4 .git/objects/c4/d59f390b9cfd4318117afde11d601c1085f241</tt></pre> </div></div> -<div class="para"><p>and the contents of these files is just the compressed data plus a +<div class="paragraph"><p>and the contents of these files is just the compressed data plus a header identifying their length and their type. The type is either a blob, a tree, a commit, or a tag.</p></div> -<div class="para"><p>The simplest commit to find is the HEAD commit, which we can find +<div class="paragraph"><p>The simplest commit to find is the HEAD commit, which we can find from .git/HEAD:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ cat .git/HEAD ref: refs/heads/master</tt></pre> </div></div> -<div class="para"><p>As you can see, this tells us which branch we're currently on, and it +<div class="paragraph"><p>As you can see, this tells us which branch we’re currently on, and it tells us this by naming a file under the .git directory, which itself contains a SHA1 name referring to a commit object, which we can examine with cat-file:</p></div> @@ -455,7 +549,7 @@ add emphasis</tt></pre> </div></div> -<div class="para"><p>The "tree" object here refers to the new state of the tree:</p></div> +<div class="paragraph"><p>The "tree" object here refers to the new state of the tree:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git ls-tree d0492b36 @@ -463,7 +557,7 @@ $ git cat-file blob a0423896 hello world!</tt></pre> </div></div> -<div class="para"><p>and the "parent" object refers to the previous commit:</p></div> +<div class="paragraph"><p>and the "parent" object refers to the previous commit:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git cat-file commit 54196cc2 @@ -473,23 +567,23 @@ initial commit</tt></pre> </div></div> -<div class="para"><p>The tree object is the tree we examined first, and this commit is +<div class="paragraph"><p>The tree object is the tree we examined first, and this commit is unusual in that it lacks any parent.</p></div> -<div class="para"><p>Most commits have only one parent, but it is also common for a commit +<div class="paragraph"><p>Most commits have only one parent, but it is also common for a commit to have multiple parents. In that case the commit represents a merge, with the parent references pointing to the heads of the merged branches.</p></div> -<div class="para"><p>Besides blobs, trees, and commits, the only remaining type of object -is a "tag", which we won't discuss here; refer to <a href="git-tag.html">git-tag(1)</a> +<div class="paragraph"><p>Besides blobs, trees, and commits, the only remaining type of object +is a "tag", which we won’t discuss here; refer to <a href="git-tag.html">git-tag(1)</a> for details.</p></div> -<div class="para"><p>So now we know how git uses the object database to represent a -project's history:</p></div> -<div class="ilist"><ul> +<div class="paragraph"><p>So now we know how git uses the object database to represent a +project’s history:</p></div> +<div class="ulist"><ul> <li> <p> "commit" objects refer to "tree" objects representing the snapshot of a directory tree at a particular point in the - history, and refer to "parent" commits to show how they're + history, and refer to "parent" commits to show how they’re connected into the project history. </p> </li> @@ -517,30 +611,30 @@ </p> </li> </ul></div> -<div class="para"><p>Note, by the way, that lots of commands take a tree as an argument. +<div class="paragraph"><p>Note, by the way, that lots of commands take a tree as an argument. But as we can see above, a tree can be referred to in many different -ways--by the SHA1 name for that tree, by the name of a commit that +ways—by the SHA1 name for that tree, by the name of a commit that refers to the tree, by the name of a branch whose head refers to that tree, etc.--and most such commands can accept any of these names.</p></div> -<div class="para"><p>In command synopses, the word "tree-ish" is sometimes used to +<div class="paragraph"><p>In command synopses, the word "tree-ish" is sometimes used to designate such an argument.</p></div> </div> <h2 id="_the_index_file">The index file</h2> <div class="sectionbody"> -<div class="para"><p>The primary tool we've been using to create commits is <tt>git-commit --a</tt>, which creates a commit including every change you've made to +<div class="paragraph"><p>The primary tool we’ve been using to create commits is <tt>git-commit +-a</tt>, which creates a commit including every change you’ve made to your working tree. But what if you want to commit changes only to certain files? Or only certain changes to certain files?</p></div> -<div class="para"><p>If we look at the way commits are created under the cover, we'll see +<div class="paragraph"><p>If we look at the way commits are created under the cover, we’ll see that there are more flexible ways creating commits.</p></div> -<div class="para"><p>Continuing with our test-project, let's modify file.txt again:</p></div> +<div class="paragraph"><p>Continuing with our test-project, let’s modify file.txt again:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ echo "hello world, again" >>file.txt</tt></pre> </div></div> -<div class="para"><p>but this time instead of immediately making the commit, let's take an +<div class="paragraph"><p>but this time instead of immediately making the commit, let’s take an intermediate step, and ask for diffs along the way to keep track of -what's happening:</p></div> +what’s happening:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git diff @@ -552,8 +646,8 @@ $ git add file.txt $ git diff</tt></pre> </div></div> -<div class="para"><p>The last diff is empty, but no new commits have been made, and the -head still doesn't contain the new line:</p></div> +<div class="paragraph"><p>The last diff is empty, but no new commits have been made, and the +head still doesn’t contain the new line:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git diff HEAD @@ -565,8 +659,8 @@ hello world! +hello world, again</tt></pre> </div></div> -<div class="para"><p>So <em>git diff</em> is comparing against something other than the head. -The thing that it's comparing against is actually the index file, +<div class="paragraph"><p>So <em>git diff</em> is comparing against something other than the head. +The thing that it’s comparing against is actually the index file, which is stored in .git/index in a binary format, but whose contents we can examine with ls-files:</p></div> <div class="listingblock"> @@ -579,9 +673,9 @@ hello world! hello world, again</tt></pre> </div></div> -<div class="para"><p>So what our <em>git add</em> did was store a new blob and then put +<div class="paragraph"><p>So what our <em>git add</em> did was store a new blob and then put a reference to it in the index file. If we modify the file again, -we'll see that the new modifications are reflected in the <em>git diff</em> +we’ll see that the new modifications are reflected in the <em>git diff</em> output:</p></div> <div class="listingblock"> <div class="content"> @@ -595,7 +689,7 @@ hello world, again +again?</tt></pre> </div></div> -<div class="para"><p>With the right arguments, <em>git diff</em> can also show us the difference +<div class="paragraph"><p>With the right arguments, <em>git diff</em> can also show us the difference between the working directory and the last commit, or between the index and the last commit:</p></div> <div class="listingblock"> @@ -618,7 +712,7 @@ hello world! +hello world, again</tt></pre> </div></div> -<div class="para"><p>At any time, we can create a new commit using <em>git commit</em> (without +<div class="paragraph"><p>At any time, we can create a new commit using <em>git commit</em> (without the "-a" option), and verify that the state committed only includes the changes stored in the index file, not the additional change that is still only in our working tree:</p></div> @@ -635,31 +729,31 @@ hello world, again +again?</tt></pre> </div></div> -<div class="para"><p>So by default <em>git commit</em> uses the index to create the commit, not +<div class="paragraph"><p>So by default <em>git commit</em> uses the index to create the commit, not the working tree; the "-a" option to commit tells it to first update the index with all changes in the working tree.</p></div> -<div class="para"><p>Finally, it's worth looking at the effect of <em>git add</em> on the index +<div class="paragraph"><p>Finally, it’s worth looking at the effect of <em>git add</em> on the index file:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ echo "goodbye, world" >closing.txt $ git add closing.txt</tt></pre> </div></div> -<div class="para"><p>The effect of the <em>git add</em> was to add one entry to the index file:</p></div> +<div class="paragraph"><p>The effect of the <em>git add</em> was to add one entry to the index file:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git ls-files --stage 100644 8b9743b20d4b15be3955fc8d5cd2b09cd2336138 0 closing.txt 100644 513feba2e53ebbd2532419ded848ba19de88ba00 0 file.txt</tt></pre> </div></div> -<div class="para"><p>And, as you can see with cat-file, this new entry refers to the +<div class="paragraph"><p>And, as you can see with cat-file, this new entry refers to the current contents of the file:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git cat-file blob 8b9743b2 goodbye, world</tt></pre> </div></div> -<div class="para"><p>The "status" command is a useful way to get a quick summary of the +<div class="paragraph"><p>The "status" command is a useful way to get a quick summary of the situation:</p></div> <div class="listingblock"> <div class="content"> @@ -670,22 +764,22 @@ # # new file: closing.txt # -# Changed but not updated: +# Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # # modified: file.txt #</tt></pre> </div></div> -<div class="para"><p>Since the current state of closing.txt is cached in the index file, +<div class="paragraph"><p>Since the current state of closing.txt is cached in the index file, it is listed as "Changes to be committed". Since file.txt has -changes in the working directory that aren't reflected in the index, +changes in the working directory that aren’t reflected in the index, it is marked "changed but not updated". At this point, running "git commit" would create a commit that added closing.txt (with its new -contents), but that didn't modify file.txt.</p></div> -<div class="para"><p>Also, note that a bare <tt>git diff</tt> shows the changes to file.txt, but +contents), but that didn’t modify file.txt.</p></div> +<div class="paragraph"><p>Also, note that a bare <tt>git diff</tt> shows the changes to file.txt, but not the addition of closing.txt, because the version of closing.txt in the index file is identical to the one in the working directory.</p></div> -<div class="para"><p>In addition to being the staging area for new commits, the index file +<div class="paragraph"><p>In addition to being the staging area for new commits, the index file is also populated from the object database when checking out a branch, and is used to hold the trees involved in a merge operation. See <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a> and the relevant man @@ -693,38 +787,38 @@ </div> <h2 id="_what_next">What next?</h2> <div class="sectionbody"> -<div class="para"><p>At this point you should know everything necessary to read the man +<div class="paragraph"><p>At this point you should know everything necessary to read the man pages for any of the git commands; one good place to start would be with the commands mentioned in <a href="everyday.html">Everyday git</a>. You should be able to find any unknown jargon in <a href="gitglossary.html">gitglossary(7)</a>.</p></div> -<div class="para"><p>The <a href="user-manual.html">Git User's Manual</a> provides a more +<div class="paragraph"><p>The <a href="user-manual.html">Git User’s Manual</a> provides a more comprehensive introduction to git.</p></div> -<div class="para"><p><a href="gitcvs-migration.html">gitcvs-migration(7)</a> explains how to +<div class="paragraph"><p><a href="gitcvs-migration.html">gitcvs-migration(7)</a> explains how to import a CVS repository into git, and shows how to use git in a CVS-like way.</p></div> -<div class="para"><p>For some interesting examples of git use, see the +<div class="paragraph"><p>For some interesting examples of git use, see the <a href="howto-index.html">howtos</a>.</p></div> -<div class="para"><p>For git developers, <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a> goes +<div class="paragraph"><p>For git developers, <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a> goes into detail on the lower-level git mechanisms involved in, for example, creating a new commit.</p></div> </div> <h2 id="_see_also">SEE ALSO</h2> <div class="sectionbody"> -<div class="para"><p><a href="gittutorial.html">gittutorial(7)</a>, +<div class="paragraph"><p><a href="gittutorial.html">gittutorial(7)</a>, <a href="gitcvs-migration.html">gitcvs-migration(7)</a>, <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>, <a href="gitglossary.html">gitglossary(7)</a>, <a href="git-help.html">git-help(1)</a>, <a href="everyday.html">Everyday git</a>, -<a href="user-manual.html">The Git User's Manual</a></p></div> +<a href="user-manual.html">The Git User’s Manual</a></p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> -<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite.</p></div> +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite.</p></div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:57:05 UTC +Last updated 2010-11-25 03:13:43 UTC </div> </div> </body>
diff --git a/gittutorial-2.txt b/gittutorial-2.txt index ecab0c0..7fe5848 100644 --- a/gittutorial-2.txt +++ b/gittutorial-2.txt
@@ -373,7 +373,7 @@ # # new file: closing.txt # -# Changed but not updated: +# Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # # modified: file.txt
diff --git a/gittutorial.html b/gittutorial.html index c57092d..2ea2db9 100644 --- a/gittutorial.html +++ b/gittutorial.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>gittutorial(7)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -271,7 +339,24 @@ margin-left: 6em; font-size: 0.9em; } -include1::./stylesheets/xhtml11-manpage.css[] +/* Overrides for manpage documents */ +h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +h2 { + border-style: none; +} +div.sectionbody { + margin-left: 5%; +} + +@media print { + div#toc { display: none; } +} + /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { @@ -280,6 +365,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -292,8 +378,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -304,7 +399,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>gittutorial(7)</title> </head> <body> <div id="header"> @@ -318,31 +412,31 @@ </p> </div> </div> -<h2>SYNOPSIS</h2> +<h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> -<div class="para"><p>git *</p></div> +<div class="paragraph"><p>git *</p></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> -<div class="para"><p>This tutorial explains how to import a new project into git, make +<div class="paragraph"><p>This tutorial explains how to import a new project into git, make changes to it, and share changes with other developers.</p></div> -<div class="para"><p>If you are instead primarily interested in using git to fetch a project, +<div class="paragraph"><p>If you are instead primarily interested in using git to fetch a project, for example, to test the latest version, you may prefer to start with -the first two chapters of <a href="user-manual.html">The Git User's Manual</a>.</p></div> -<div class="para"><p>First, note that you can get documentation for a command such as +the first two chapters of <a href="user-manual.html">The Git User’s Manual</a>.</p></div> +<div class="paragraph"><p>First, note that you can get documentation for a command such as <tt>git log --graph</tt> with:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ man git-log</tt></pre> </div></div> -<div class="para"><p>or:</p></div> +<div class="paragraph"><p>or:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git help log</tt></pre> </div></div> -<div class="para"><p>With the latter, you can use the manual viewer of your choice; see +<div class="paragraph"><p>With the latter, you can use the manual viewer of your choice; see <a href="git-help.html">git-help(1)</a> for more information.</p></div> -<div class="para"><p>It is a good idea to introduce yourself to git with your name and +<div class="paragraph"><p>It is a good idea to introduce yourself to git with your name and public email address before doing any operation. The easiest way to do so is:</p></div> <div class="listingblock"> @@ -353,7 +447,7 @@ </div> <h2 id="_importing_a_new_project">Importing a new project</h2> <div class="sectionbody"> -<div class="para"><p>Assume you have a tarball project.tar.gz with your initial work. You +<div class="paragraph"><p>Assume you have a tarball project.tar.gz with your initial work. You can place it under git revision control as follows.</p></div> <div class="listingblock"> <div class="content"> @@ -361,44 +455,44 @@ $ cd project $ git init</tt></pre> </div></div> -<div class="para"><p>Git will reply</p></div> +<div class="paragraph"><p>Git will reply</p></div> <div class="listingblock"> <div class="content"> <pre><tt>Initialized empty Git repository in .git/</tt></pre> </div></div> -<div class="para"><p>You've now initialized the working directory--you may notice a new +<div class="paragraph"><p>You’ve now initialized the working directory—you may notice a new directory created, named ".git".</p></div> -<div class="para"><p>Next, tell git to take a snapshot of the contents of all files under the +<div class="paragraph"><p>Next, tell git to take a snapshot of the contents of all files under the current directory (note the <em>.</em>), with <em>git add</em>:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git add .</tt></pre> </div></div> -<div class="para"><p>This snapshot is now stored in a temporary staging area which git calls +<div class="paragraph"><p>This snapshot is now stored in a temporary staging area which git calls the "index". You can permanently store the contents of the index in the repository with <em>git commit</em>:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git commit</tt></pre> </div></div> -<div class="para"><p>This will prompt you for a commit message. You've now stored the first +<div class="paragraph"><p>This will prompt you for a commit message. You’ve now stored the first version of your project in git.</p></div> </div> <h2 id="_making_changes">Making changes</h2> <div class="sectionbody"> -<div class="para"><p>Modify some files, then add their updated contents to the index:</p></div> +<div class="paragraph"><p>Modify some files, then add their updated contents to the index:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git add file1 file2 file3</tt></pre> </div></div> -<div class="para"><p>You are now ready to commit. You can see what is about to be committed +<div class="paragraph"><p>You are now ready to commit. You can see what is about to be committed using <em>git diff</em> with the --cached option:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git diff --cached</tt></pre> </div></div> -<div class="para"><p>(Without --cached, <em>git diff</em> will show you any changes that -you've made but not yet added to the index.) You can also get a brief +<div class="paragraph"><p>(Without --cached, <em>git diff</em> will show you any changes that +you’ve made but not yet added to the index.) You can also get a brief summary of the situation with <em>git status</em>:</p></div> <div class="listingblock"> <div class="content"> @@ -412,22 +506,22 @@ # modified: file3 #</tt></pre> </div></div> -<div class="para"><p>If you need to make any further adjustments, do so now, and then add any +<div class="paragraph"><p>If you need to make any further adjustments, do so now, and then add any newly modified content to the index. Finally, commit your changes with:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git commit</tt></pre> </div></div> -<div class="para"><p>This will again prompt you for a message describing the change, and then +<div class="paragraph"><p>This will again prompt you for a message describing the change, and then record a new version of the project.</p></div> -<div class="para"><p>Alternatively, instead of running <em>git add</em> beforehand, you can use</p></div> +<div class="paragraph"><p>Alternatively, instead of running <em>git add</em> beforehand, you can use</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git commit -a</tt></pre> </div></div> -<div class="para"><p>which will automatically notice any modified (but not new) files, add +<div class="paragraph"><p>which will automatically notice any modified (but not new) files, add them to the index, and commit, all in one step.</p></div> -<div class="para"><p>A note on commit messages: Though not required, it's a good idea to +<div class="paragraph"><p>A note on commit messages: Though not required, it’s a good idea to begin the commit message with a single short (less than 50 character) line summarizing the change, followed by a blank line and then a more thorough description. Tools that turn commits into email, for @@ -436,8 +530,8 @@ </div> <h2 id="_git_tracks_content_not_files">Git tracks content not files</h2> <div class="sectionbody"> -<div class="para"><p>Many revision control systems provide an <tt>add</tt> command that tells the -system to start tracking changes to a new file. Git's <tt>add</tt> command +<div class="paragraph"><p>Many revision control systems provide an <tt>add</tt> command that tells the +system to start tracking changes to a new file. Git’s <tt>add</tt> command does something simpler and more powerful: <em>git add</em> is used both for new and newly modified files, and in both cases it takes a snapshot of the given files and stages that content in the index, ready for inclusion in @@ -445,17 +539,17 @@ </div> <h2 id="_viewing_project_history">Viewing project history</h2> <div class="sectionbody"> -<div class="para"><p>At any point you can view the history of your changes using</p></div> +<div class="paragraph"><p>At any point you can view the history of your changes using</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git log</tt></pre> </div></div> -<div class="para"><p>If you also want to see complete diffs at each step, use</p></div> +<div class="paragraph"><p>If you also want to see complete diffs at each step, use</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git log -p</tt></pre> </div></div> -<div class="para"><p>Often the overview of the change is useful to get a feel of +<div class="paragraph"><p>Often the overview of the change is useful to get a feel of each step</p></div> <div class="listingblock"> <div class="content"> @@ -464,24 +558,24 @@ </div> <h2 id="_managing_branches">Managing branches</h2> <div class="sectionbody"> -<div class="para"><p>A single git repository can maintain multiple branches of +<div class="paragraph"><p>A single git repository can maintain multiple branches of development. To create a new branch named "experimental", use</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git branch experimental</tt></pre> </div></div> -<div class="para"><p>If you now run</p></div> +<div class="paragraph"><p>If you now run</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git branch</tt></pre> </div></div> -<div class="para"><p>you'll get a list of all existing branches:</p></div> +<div class="paragraph"><p>you’ll get a list of all existing branches:</p></div> <div class="listingblock"> <div class="content"> <pre><tt> experimental * master</tt></pre> </div></div> -<div class="para"><p>The "experimental" branch is the one you just created, and the +<div class="paragraph"><p>The "experimental" branch is the one you just created, and the "master" branch is a default branch that was created for you automatically. The asterisk marks the branch you are currently on; type</p></div> @@ -489,7 +583,7 @@ <div class="content"> <pre><tt>$ git checkout experimental</tt></pre> </div></div> -<div class="para"><p>to switch to the experimental branch. Now edit a file, commit the +<div class="paragraph"><p>to switch to the experimental branch. Now edit a file, commit the change, and switch back to the master branch:</p></div> <div class="listingblock"> <div class="content"> @@ -497,94 +591,94 @@ $ git commit -a $ git checkout master</tt></pre> </div></div> -<div class="para"><p>Check that the change you made is no longer visible, since it was -made on the experimental branch and you're back on the master branch.</p></div> -<div class="para"><p>You can make a different change on the master branch:</p></div> +<div class="paragraph"><p>Check that the change you made is no longer visible, since it was +made on the experimental branch and you’re back on the master branch.</p></div> +<div class="paragraph"><p>You can make a different change on the master branch:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>(edit file) $ git commit -a</tt></pre> </div></div> -<div class="para"><p>at this point the two branches have diverged, with different changes +<div class="paragraph"><p>at this point the two branches have diverged, with different changes made in each. To merge the changes made in experimental into master, run</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git merge experimental</tt></pre> </div></div> -<div class="para"><p>If the changes don't conflict, you're done. If there are conflicts, +<div class="paragraph"><p>If the changes don’t conflict, you’re done. If there are conflicts, markers will be left in the problematic files showing the conflict;</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git diff</tt></pre> </div></div> -<div class="para"><p>will show this. Once you've edited the files to resolve the +<div class="paragraph"><p>will show this. Once you’ve edited the files to resolve the conflicts,</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git commit -a</tt></pre> </div></div> -<div class="para"><p>will commit the result of the merge. Finally,</p></div> +<div class="paragraph"><p>will commit the result of the merge. Finally,</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ gitk</tt></pre> </div></div> -<div class="para"><p>will show a nice graphical representation of the resulting history.</p></div> -<div class="para"><p>At this point you could delete the experimental branch with</p></div> +<div class="paragraph"><p>will show a nice graphical representation of the resulting history.</p></div> +<div class="paragraph"><p>At this point you could delete the experimental branch with</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git branch -d experimental</tt></pre> </div></div> -<div class="para"><p>This command ensures that the changes in the experimental branch are +<div class="paragraph"><p>This command ensures that the changes in the experimental branch are already in the current branch.</p></div> -<div class="para"><p>If you develop on a branch crazy-idea, then regret it, you can always +<div class="paragraph"><p>If you develop on a branch crazy-idea, then regret it, you can always delete the branch with</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git branch -D crazy-idea</tt></pre> </div></div> -<div class="para"><p>Branches are cheap and easy, so this is a good way to try something +<div class="paragraph"><p>Branches are cheap and easy, so this is a good way to try something out.</p></div> </div> <h2 id="_using_git_for_collaboration">Using git for collaboration</h2> <div class="sectionbody"> -<div class="para"><p>Suppose that Alice has started a new project with a git repository in +<div class="paragraph"><p>Suppose that Alice has started a new project with a git repository in /home/alice/project, and that Bob, who has a home directory on the same machine, wants to contribute.</p></div> -<div class="para"><p>Bob begins with:</p></div> +<div class="paragraph"><p>Bob begins with:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>bob$ git clone /home/alice/project myrepo</tt></pre> </div></div> -<div class="para"><p>This creates a new directory "myrepo" containing a clone of Alice's +<div class="paragraph"><p>This creates a new directory "myrepo" containing a clone of Alice’s repository. The clone is on an equal footing with the original -project, possessing its own copy of the original project's history.</p></div> -<div class="para"><p>Bob then makes some changes and commits them:</p></div> +project, possessing its own copy of the original project’s history.</p></div> +<div class="paragraph"><p>Bob then makes some changes and commits them:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>(edit files) bob$ git commit -a (repeat as necessary)</tt></pre> </div></div> -<div class="para"><p>When he's ready, he tells Alice to pull changes from the repository +<div class="paragraph"><p>When he’s ready, he tells Alice to pull changes from the repository at /home/bob/myrepo. She does this with:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>alice$ cd /home/alice/project alice$ git pull /home/bob/myrepo master</tt></pre> </div></div> -<div class="para"><p>This merges the changes from Bob's "master" branch into Alice's +<div class="paragraph"><p>This merges the changes from Bob’s "master" branch into Alice’s current branch. If Alice has made her own changes in the meantime, then she may need to manually fix any conflicts.</p></div> -<div class="para"><p>The "pull" command thus performs two operations: it fetches changes +<div class="paragraph"><p>The "pull" command thus performs two operations: it fetches changes from a remote branch, then merges them into the current branch.</p></div> -<div class="para"><p>Note that in general, Alice would want her local changes committed before -initiating this "pull". If Bob's work conflicts with what Alice did since +<div class="paragraph"><p>Note that in general, Alice would want her local changes committed before +initiating this "pull". If Bob’s work conflicts with what Alice did since their histories forked, Alice will use her working tree and the index to resolve conflicts, and existing local changes will interfere with the conflict resolution process (git will still perform the fetch but will refuse to merge --- Alice will have to get rid of her local changes in some way and pull again when this happens).</p></div> -<div class="para"><p>Alice can peek at what Bob did without merging first, using the "fetch" +<div class="paragraph"><p>Alice can peek at what Bob did without merging first, using the "fetch" command; this allows Alice to inspect what Bob did, using a special symbol "FETCH_HEAD", in order to determine if he has anything worth pulling, like this:</p></div> @@ -593,35 +687,35 @@ <pre><tt>alice$ git fetch /home/bob/myrepo master alice$ git log -p HEAD..FETCH_HEAD</tt></pre> </div></div> -<div class="para"><p>This operation is safe even if Alice has uncommitted local changes. +<div class="paragraph"><p>This operation is safe even if Alice has uncommitted local changes. The range notation "HEAD..FETCH_HEAD" means "show everything that is reachable from the FETCH_HEAD but exclude anything that is reachable from HEAD". Alice already knows everything that leads to her current state (HEAD), and reviews what Bob has in his state (FETCH_HEAD) that she has not seen with this command.</p></div> -<div class="para"><p>If Alice wants to visualize what Bob did since their histories forked +<div class="paragraph"><p>If Alice wants to visualize what Bob did since their histories forked she can issue the following command:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ gitk HEAD..FETCH_HEAD</tt></pre> </div></div> -<div class="para"><p>This uses the same two-dot range notation we saw earlier with <em>git log</em>.</p></div> -<div class="para"><p>Alice may want to view what both of them did since they forked. +<div class="paragraph"><p>This uses the same two-dot range notation we saw earlier with <em>git log</em>.</p></div> +<div class="paragraph"><p>Alice may want to view what both of them did since they forked. She can use three-dot form instead of the two-dot form:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ gitk HEAD...FETCH_HEAD</tt></pre> </div></div> -<div class="para"><p>This means "show everything that is reachable from either one, but +<div class="paragraph"><p>This means "show everything that is reachable from either one, but exclude anything that is reachable from both of them".</p></div> -<div class="para"><p>Please note that these range notation can be used with both gitk +<div class="paragraph"><p>Please note that these range notation can be used with both gitk and "git log".</p></div> -<div class="para"><p>After inspecting what Bob did, if there is nothing urgent, Alice may -decide to continue working without pulling from Bob. If Bob's history +<div class="paragraph"><p>After inspecting what Bob did, if there is nothing urgent, Alice may +decide to continue working without pulling from Bob. If Bob’s history does have something Alice would immediately need, Alice may choose to stash her work-in-progress first, do a "pull", and then finally unstash her work-in-progress on top of the resulting history.</p></div> -<div class="para"><p>When you are working in a small closely knit group, it is not +<div class="paragraph"><p>When you are working in a small closely knit group, it is not unusual to interact with the same repository over and over again. By defining <em>remote</em> repository shorthand, you can make it easier:</p></div> @@ -629,44 +723,44 @@ <div class="content"> <pre><tt>alice$ git remote add bob /home/bob/myrepo</tt></pre> </div></div> -<div class="para"><p>With this, Alice can perform the first part of the "pull" operation +<div class="paragraph"><p>With this, Alice can perform the first part of the "pull" operation alone using the <em>git fetch</em> command without merging them with her own branch, using:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>alice$ git fetch bob</tt></pre> </div></div> -<div class="para"><p>Unlike the longhand form, when Alice fetches from Bob using a +<div class="paragraph"><p>Unlike the longhand form, when Alice fetches from Bob using a remote repository shorthand set up with <em>git remote</em>, what was -fetched is stored in a remote tracking branch, in this case +fetched is stored in a remote-tracking branch, in this case <tt>bob/master</tt>. So after this:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>alice$ git log -p master..bob/master</tt></pre> </div></div> -<div class="para"><p>shows a list of all the changes that Bob made since he branched from -Alice's master branch.</p></div> -<div class="para"><p>After examining those changes, Alice +<div class="paragraph"><p>shows a list of all the changes that Bob made since he branched from +Alice’s master branch.</p></div> +<div class="paragraph"><p>After examining those changes, Alice could merge the changes into her master branch:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>alice$ git merge bob/master</tt></pre> </div></div> -<div class="para"><p>This <tt>merge</tt> can also be done by <em>pulling from her own remote -tracking branch</em>, like this:</p></div> +<div class="paragraph"><p>This <tt>merge</tt> can also be done by <em>pulling from her own remote-tracking +branch</em>, like this:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>alice$ git pull . remotes/bob/master</tt></pre> </div></div> -<div class="para"><p>Note that git pull always merges into the current branch, +<div class="paragraph"><p>Note that git pull always merges into the current branch, regardless of what else is given on the command line.</p></div> -<div class="para"><p>Later, Bob can update his repo with Alice's latest changes using</p></div> +<div class="paragraph"><p>Later, Bob can update his repo with Alice’s latest changes using</p></div> <div class="listingblock"> <div class="content"> <pre><tt>bob$ git pull</tt></pre> </div></div> -<div class="para"><p>Note that he doesn't need to give the path to Alice's repository; -when Bob cloned Alice's repository, git stored the location of her +<div class="paragraph"><p>Note that he doesn’t need to give the path to Alice’s repository; +when Bob cloned Alice’s repository, git stored the location of her repository in the repository configuration, and that location is used for pulls:</p></div> <div class="listingblock"> @@ -674,31 +768,31 @@ <pre><tt>bob$ git config --get remote.origin.url /home/alice/project</tt></pre> </div></div> -<div class="para"><p>(The complete configuration created by <em>git clone</em> is visible using +<div class="paragraph"><p>(The complete configuration created by <em>git clone</em> is visible using <tt>git config -l</tt>, and the <a href="git-config.html">git-config(1)</a> man page explains the meaning of each option.)</p></div> -<div class="para"><p>Git also keeps a pristine copy of Alice's master branch under the +<div class="paragraph"><p>Git also keeps a pristine copy of Alice’s master branch under the name "origin/master":</p></div> <div class="listingblock"> <div class="content"> <pre><tt>bob$ git branch -r origin/master</tt></pre> </div></div> -<div class="para"><p>If Bob later decides to work from a different host, he can still +<div class="paragraph"><p>If Bob later decides to work from a different host, he can still perform clones and pulls using the ssh protocol:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>bob$ git clone alice.org:/home/alice/project myrepo</tt></pre> </div></div> -<div class="para"><p>Alternatively, git has a native protocol, or can use rsync or http; +<div class="paragraph"><p>Alternatively, git has a native protocol, or can use rsync or http; see <a href="git-pull.html">git-pull(1)</a> for details.</p></div> -<div class="para"><p>Git can also be used in a CVS-like mode, with a central repository +<div class="paragraph"><p>Git can also be used in a CVS-like mode, with a central repository that various users push changes to; see <a href="git-push.html">git-push(1)</a> and <a href="gitcvs-migration.html">gitcvs-migration(7)</a>.</p></div> </div> <h2 id="_exploring_history">Exploring history</h2> <div class="sectionbody"> -<div class="para"><p>Git history is represented as a series of interrelated commits. We +<div class="paragraph"><p>Git history is represented as a series of interrelated commits. We have already seen that the <em>git log</em> command can list those commits. Note that first line of each git log entry also gives a name for the commit:</p></div> @@ -711,13 +805,13 @@ merge-base: Clarify the comments on post processing.</tt></pre> </div></div> -<div class="para"><p>We can give this name to <em>git show</em> to see the details about this +<div class="paragraph"><p>We can give this name to <em>git show</em> to see the details about this commit.</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git show c82a22c39cbc32576f64f5c6b3f24b99ea8149c7</tt></pre> </div></div> -<div class="para"><p>But there are other ways to refer to commits. You can use any initial +<div class="paragraph"><p>But there are other ways to refer to commits. You can use any initial part of the name that is long enough to uniquely identify the commit:</p></div> <div class="listingblock"> <div class="content"> @@ -726,7 +820,7 @@ $ git show HEAD # the tip of the current branch $ git show experimental # the tip of the "experimental" branch</tt></pre> </div></div> -<div class="para"><p>Every commit usually has one "parent" commit +<div class="paragraph"><p>Every commit usually has one "parent" commit which points to the previous state of the project:</p></div> <div class="listingblock"> <div class="content"> @@ -734,22 +828,22 @@ $ git show HEAD^^ # to see the grandparent of HEAD $ git show HEAD~4 # to see the great-great grandparent of HEAD</tt></pre> </div></div> -<div class="para"><p>Note that merge commits may have more than one parent:</p></div> +<div class="paragraph"><p>Note that merge commits may have more than one parent:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git show HEAD^1 # show the first parent of HEAD (same as HEAD^) $ git show HEAD^2 # show the second parent of HEAD</tt></pre> </div></div> -<div class="para"><p>You can also give commits names of your own; after running</p></div> +<div class="paragraph"><p>You can also give commits names of your own; after running</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git tag v2.5 1b2e1d63ff</tt></pre> </div></div> -<div class="para"><p>you can refer to 1b2e1d63ff by the name "v2.5". If you intend to +<div class="paragraph"><p>you can refer to 1b2e1d63ff by the name "v2.5". If you intend to share this name with other people (for example, to identify a release version), you should create a "tag" object, and perhaps sign it; see <a href="git-tag.html">git-tag(1)</a> for details.</p></div> -<div class="para"><p>Any git command that needs to know a commit can take any of these +<div class="paragraph"><p>Any git command that needs to know a commit can take any of these names. For example:</p></div> <div class="listingblock"> <div class="content"> @@ -759,29 +853,29 @@ $ git reset --hard HEAD^ # reset your current branch and working # directory to its state at HEAD^</tt></pre> </div></div> -<div class="para"><p>Be careful with that last command: in addition to losing any changes +<div class="paragraph"><p>Be careful with that last command: in addition to losing any changes in the working directory, it will also remove all later commits from this branch. If this branch is the only branch containing those -commits, they will be lost. Also, don't use <em>git reset</em> on a +commits, they will be lost. Also, don’t use <em>git reset</em> on a publicly-visible branch that other developers pull from, as it will force needless merges on other developers to clean up the history. If you need to undo changes that you have pushed, use <em>git revert</em> instead.</p></div> -<div class="para"><p>The <em>git grep</em> command can search for strings in any version of your +<div class="paragraph"><p>The <em>git grep</em> command can search for strings in any version of your project, so</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git grep "hello" v2.5</tt></pre> </div></div> -<div class="para"><p>searches for all occurrences of "hello" in v2.5.</p></div> -<div class="para"><p>If you leave out the commit name, <em>git grep</em> will search any of the +<div class="paragraph"><p>searches for all occurrences of "hello" in v2.5.</p></div> +<div class="paragraph"><p>If you leave out the commit name, <em>git grep</em> will search any of the files it manages in your current directory. So</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git grep "hello"</tt></pre> </div></div> -<div class="para"><p>is a quick way to search just the files that are tracked by git.</p></div> -<div class="para"><p>Many git commands also take sets of commits, which can be specified +<div class="paragraph"><p>is a quick way to search just the files that are tracked by git.</p></div> +<div class="paragraph"><p>Many git commands also take sets of commits, which can be specified in a number of ways. Here are some examples with <em>git log</em>:</p></div> <div class="listingblock"> <div class="content"> @@ -791,7 +885,7 @@ $ git log v2.5.. Makefile # commits since v2.5 which modify # Makefile</tt></pre> </div></div> -<div class="para"><p>You can also give <em>git log</em> a "range" of commits where the first is not +<div class="paragraph"><p>You can also give <em>git log</em> a "range" of commits where the first is not necessarily an ancestor of the second; for example, if the tips of the branches "stable" and "master" diverged from a common commit some time ago, then</p></div> @@ -799,37 +893,37 @@ <div class="content"> <pre><tt>$ git log stable..master</tt></pre> </div></div> -<div class="para"><p>will list commits made in the master branch but not in the +<div class="paragraph"><p>will list commits made in the master branch but not in the stable branch, while</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git log master..stable</tt></pre> </div></div> -<div class="para"><p>will show the list of commits made on the stable branch but not +<div class="paragraph"><p>will show the list of commits made on the stable branch but not the master branch.</p></div> -<div class="para"><p>The <em>git log</em> command has a weakness: it must present commits in a +<div class="paragraph"><p>The <em>git log</em> command has a weakness: it must present commits in a list. When the history has lines of development that diverged and then merged back together, the order in which <em>git log</em> presents those commits is meaningless.</p></div> -<div class="para"><p>Most projects with multiple contributors (such as the Linux kernel, +<div class="paragraph"><p>Most projects with multiple contributors (such as the Linux kernel, or git itself) have frequent merges, and <em>gitk</em> does a better job of visualizing their history. For example,</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ gitk --since="2 weeks ago" drivers/</tt></pre> </div></div> -<div class="para"><p>allows you to browse any commits from the last 2 weeks of commits +<div class="paragraph"><p>allows you to browse any commits from the last 2 weeks of commits that modified files under the "drivers" directory. (Note: you can -adjust gitk's fonts by holding down the control key while pressing +adjust gitk’s fonts by holding down the control key while pressing "-" or "+".)</p></div> -<div class="para"><p>Finally, most commands that take filenames will optionally allow you +<div class="paragraph"><p>Finally, most commands that take filenames will optionally allow you to precede any filename by a commit, to specify a particular version of the file:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git diff v2.5:Makefile HEAD:Makefile.in</tt></pre> </div></div> -<div class="para"><p>You can also use <em>git show</em> to see any such file:</p></div> +<div class="paragraph"><p>You can also use <em>git show</em> to see any such file:</p></div> <div class="listingblock"> <div class="content"> <pre><tt>$ git show v2.5:Makefile</tt></pre> @@ -837,15 +931,15 @@ </div> <h2 id="_next_steps">Next Steps</h2> <div class="sectionbody"> -<div class="para"><p>This tutorial should be enough to perform basic distributed revision +<div class="paragraph"><p>This tutorial should be enough to perform basic distributed revision control for your projects. However, to fully understand the depth and power of git you need to understand two simple ideas on which it is based:</p></div> -<div class="ilist"><ul> +<div class="ulist"><ul> <li> <p> The object database is the rather elegant system used to - store the history of your project--files, directories, and + store the history of your project—files, directories, and commits. </p> </li> @@ -857,12 +951,12 @@ </p> </li> </ul></div> -<div class="para"><p>Part two of this tutorial explains the object -database, the index file, and a few other odds and ends that you'll +<div class="paragraph"><p>Part two of this tutorial explains the object +database, the index file, and a few other odds and ends that you’ll need to make the most of git. You can find it at <a href="gittutorial-2.html">gittutorial-2(7)</a>.</p></div> -<div class="para"><p>If you don't want to continue with that right away, a few other +<div class="paragraph"><p>If you don’t want to continue with that right away, a few other digressions that may be interesting at this point are:</p></div> -<div class="ilist"><ul> +<div class="ulist"><ul> <li> <p> <a href="git-format-patch.html">git-format-patch(1)</a>, <a href="git-am.html">git-am(1)</a>: These convert @@ -875,7 +969,7 @@ <p> <a href="git-bisect.html">git-bisect(1)</a>: When there is a regression in your project, one way to track down the bug is by searching through - the history to find the exact commit that's to blame. Git bisect + the history to find the exact commit that’s to blame. Git bisect can help you perform a binary search for that commit. It is smart enough to perform a close-to-optimal search even in the case of complex non-linear history with lots of merged branches. @@ -901,22 +995,22 @@ </div> <h2 id="_see_also">SEE ALSO</h2> <div class="sectionbody"> -<div class="para"><p><a href="gittutorial-2.html">gittutorial-2(7)</a>, +<div class="paragraph"><p><a href="gittutorial-2.html">gittutorial-2(7)</a>, <a href="gitcvs-migration.html">gitcvs-migration(7)</a>, <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>, <a href="gitglossary.html">gitglossary(7)</a>, <a href="git-help.html">git-help(1)</a>, <a href="gitworkflows.html">gitworkflows(7)</a>, <a href="everyday.html">Everyday git</a>, -<a href="user-manual.html">The Git User's Manual</a></p></div> +<a href="user-manual.html">The Git User’s Manual</a></p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> -<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite.</p></div> +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite.</p></div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:57:04 UTC +Last updated 2010-11-25 03:13:43 UTC </div> </div> </body>
diff --git a/gittutorial.txt b/gittutorial.txt index 1c16066..0982f74 100644 --- a/gittutorial.txt +++ b/gittutorial.txt
@@ -385,7 +385,7 @@ Unlike the longhand form, when Alice fetches from Bob using a remote repository shorthand set up with 'git remote', what was -fetched is stored in a remote tracking branch, in this case +fetched is stored in a remote-tracking branch, in this case `bob/master`. So after this: ------------------------------------- @@ -402,8 +402,8 @@ alice$ git merge bob/master ------------------------------------- -This `merge` can also be done by 'pulling from her own remote -tracking branch', like this: +This `merge` can also be done by 'pulling from her own remote-tracking +branch', like this: ------------------------------------- alice$ git pull . remotes/bob/master
diff --git a/glossary-content.txt b/glossary-content.txt index 1f029f8..f04b48e 100644 --- a/glossary-content.txt +++ b/glossary-content.txt
@@ -131,7 +131,7 @@ you have. In such these cases, you do not make a new <<def_merge,merge>> <<def_commit,commit>> but instead just update to his revision. This will happen frequently on a - <<def_tracking_branch,tracking branch>> of a remote + <<def_remote_tracking_branch,remote-tracking branch>> of a remote <<def_repository,repository>>. [[def_fetch]]fetch:: @@ -260,7 +260,7 @@ The default upstream <<def_repository,repository>>. Most projects have at least one upstream project which they track. By default 'origin' is used for that purpose. New upstream updates - will be fetched into remote <<def_tracking_branch,tracking branches>> named + will be fetched into remote <<def_remote_tracking_branch,remote-tracking branches>> named origin/name-of-upstream-branch, which you can see using `git branch -r`. @@ -349,6 +349,14 @@ master branch head as to-upstream branch at $URL". See also linkgit:git-push[1]. +[[def_remote_tracking_branch]]remote-tracking branch:: + A regular git <<def_branch,branch>> that is used to follow changes from + another <<def_repository,repository>>. A remote-tracking + branch should not contain direct modifications or have local commits + made to it. A remote-tracking branch can usually be + identified as the right-hand-side <<def_ref,ref>> in a Pull: + <<def_refspec,refspec>>. + [[def_repository]]repository:: A collection of <<def_ref,refs>> together with an <<def_object_database,object database>> containing all objects @@ -418,14 +426,6 @@ that each contain very well defined concepts or small incremental yet related changes. -[[def_tracking_branch]]tracking branch:: - A regular git <<def_branch,branch>> that is used to follow changes from - another <<def_repository,repository>>. A tracking - branch should not contain direct modifications or have local commits - made to it. A tracking branch can usually be - identified as the right-hand-side <<def_ref,ref>> in a Pull: - <<def_refspec,refspec>>. - [[def_tree]]tree:: Either a <<def_working_tree,working tree>>, or a <<def_tree_object,tree object>> together with the dependent <<def_blob_object,blob>> and tree objects
diff --git a/rev-list-options.txt b/rev-list-options.txt index 42ca059..44a2ef1 100644 --- a/rev-list-options.txt +++ b/rev-list-options.txt
@@ -269,7 +269,7 @@ Pretend as if all the refs in `refs/remotes` are listed on the command line as '<commit>'. If '<pattern>' is given, limit - remote tracking branches to ones matching given shell glob. + remote-tracking branches to ones matching given shell glob. If pattern lacks '?', '*', or '[', '/*' at the end is implied. --glob=<glob-pattern>::
diff --git a/technical/api-parse-options.html b/technical/api-parse-options.html index 58b8713..49e8902 100644 --- a/technical/api-parse-options.html +++ b/technical/api-parse-options.html
@@ -3,7 +3,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.2.5" /> +<meta name="generator" content="AsciiDoc 8.4.5" /> +<title>parse-options API</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { @@ -26,10 +27,12 @@ em { font-style: italic; + color: navy; } strong { font-weight: bold; + color: #083194; } tt { @@ -71,6 +74,10 @@ margin-bottom: 0.5em; } +ul, ol, li > p { + margin-top: 0; +} + pre { padding: 0; margin: 0; @@ -84,7 +91,7 @@ } span#email { } -span#revision { +span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } @@ -104,11 +111,13 @@ padding-bottom: 0.5em; } -div#preamble, +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { - margin-right: 10%; margin-top: 1.5em; margin-bottom: 1.5em; } @@ -123,6 +132,7 @@ /* Block element titles. */ div.title, caption.title { + color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; @@ -149,22 +159,33 @@ padding: 0.5em; } -div.listingblock { - margin-right: 0%; -} div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } -div.quoteblock > div.content { +div.quoteblock { padding-left: 2.0em; + margin-right: 10%; } - -div.attribution { +div.quoteblock > div.attribution { + padding-top: 0.5em; text-align: right; } + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } @@ -187,13 +208,9 @@ padding: 0.5em; } -div.verseblock div.content { - white-space: pre; -} - div.imageblock div.content { padding-left: 0; } -div.imageblock img { border: 1px solid silver; } span.image img { border-style: none; } +a.image:visited { color: white; } dl { margin-top: 0.8em; @@ -202,18 +219,38 @@ dt { margin-top: 0.5em; margin-bottom: 0; - font-style: italic; + font-style: normal; + color: navy; } dd > *:first-child { - margin-top: 0; + margin-top: 0.1em; } ul, ol { list-style-position: outside; } -div.olist2 ol { +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { list-style-type: lower-alpha; } +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} div.tableblock > table { border: 3px solid #527bbd; @@ -225,22 +262,53 @@ tfoot { font-weight: bold; } +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} -div.hlist { + +div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } -div.hlist td { - padding-bottom: 5px; +div.hdlist tr { + padding-bottom: 15px; } -td.hlist1 { +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { vertical-align: top; - font-style: italic; + font-style: normal; padding-right: 0.8em; + color: navy; } -td.hlist2 { +td.hdlist2 { vertical-align: top; } +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} @media print { div#footer-badges { display: none; } @@ -279,6 +347,7 @@ padding: 0.5em; } div.sidebar-title, div.image-title { + color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; @@ -291,8 +360,17 @@ padding: 0.5em; } -div.quoteblock-content { - padding-left: 2.0em; +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; } div.exampleblock-content { @@ -303,7 +381,6 @@ /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> -<title>parse-options API</title> </head> <body> <div id="header"> @@ -311,17 +388,17 @@ </div> <div id="preamble"> <div class="sectionbody"> -<div class="para"><p>The parse-options API is used to parse and massage options in git +<div class="paragraph"><p>The parse-options API is used to parse and massage options in git and to provide a usage help with consistent look.</p></div> </div> </div> <h2 id="_basics">Basics</h2> <div class="sectionbody"> -<div class="para"><p>The argument vector <tt>argv[]</tt> may usually contain mandatory or optional +<div class="paragraph"><p>The argument vector <tt>argv[]</tt> may usually contain mandatory or optional <em>non-option arguments</em>, e.g. a filename or a branch, and <em>options</em>. Options are optional arguments that start with a dash and that allow to change the behavior of a command.</p></div> -<div class="ilist"><ul> +<div class="ulist"><ul> <li> <p> There are basically three types of options: @@ -347,8 +424,8 @@ </p> </li> </ul></div> -<div class="para"><p>The parse-options API allows:</p></div> -<div class="ilist"><ul> +<div class="paragraph"><p>The parse-options API allows:</p></div> +<div class="ulist"><ul> <li> <p> <em>sticked</em> and <em>separate form</em> of options with arguments. @@ -384,7 +461,7 @@ </div> <h2 id="_steps_to_parse_options">Steps to parse options</h2> <div class="sectionbody"> -<div class="olist"><ol> +<div class="olist arabic"><ol class="arabic"> <li> <p> <tt>#include "parse-options.h"</tt> @@ -412,17 +489,17 @@ <div class="content"> <pre><tt>argc = parse_options(argc, argv, prefix, builtin_foo_options, builtin_foo_usage, flags);</tt></pre> </div></div> -<div class="para"><p><tt>parse_options()</tt> will filter out the processed options of <tt>argv[]</tt> and leave the +<div class="paragraph"><p><tt>parse_options()</tt> will filter out the processed options of <tt>argv[]</tt> and leave the non-option arguments in <tt>argv[]</tt>. <tt>argc</tt> is updated appropriately because of the assignment.</p></div> -<div class="para"><p>You can also pass NULL instead of a usage array as the fifth parameter of +<div class="paragraph"><p>You can also pass NULL instead of a usage array as the fifth parameter of parse_options(), to avoid displaying a help screen with usage info and option list. This should only be done if necessary, e.g. to implement a limited parser for only a subset of the options that needs to be run before the full parser, which in turn shows the full help message.</p></div> -<div class="para"><p>Flags are the bitwise-or of:</p></div> -<div class="vlist"><dl> -<dt> +<div class="paragraph"><p>Flags are the bitwise-or of:</p></div> +<div class="dlist"><dl> +<dt class="hdlist1"> <tt>PARSE_OPT_KEEP_DASHDASH</tt> </dt> <dd> @@ -431,7 +508,7 @@ non-option arguments. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>PARSE_OPT_STOP_AT_NON_OPTION</tt> </dt> <dd> @@ -441,39 +518,39 @@ argument. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>PARSE_OPT_KEEP_ARGV0</tt> </dt> <dd> <p> - Keep the first argument, which contains the program name. It's + Keep the first argument, which contains the program name. It’s removed from argv[] by default. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>PARSE_OPT_KEEP_UNKNOWN</tt> </dt> <dd> <p> - Keep unknown arguments instead of erroring out. This doesn't + Keep unknown arguments instead of erroring out. This doesn’t work for all combinations of arguments as users might expect - it to do. E.g. if the first argument in <tt>—unknown —known</tt> - takes a value (which we can't know), the second one is + it to do. E.g. if the first argument in <tt>--unknown --known</tt> + takes a value (which we can’t know), the second one is mistakenly interpreted as a known option. Similarly, if <tt>PARSE_OPT_STOP_AT_NON_OPTION</tt> is set, the second argument in - <tt>—unknown value</tt> will be mistakenly interpreted as a + <tt>--unknown value</tt> will be mistakenly interpreted as a non-option, not as a value belonging to the unknown option, - the parser early. That's why parse_options() errors out if + the parser early. That’s why parse_options() errors out if both options are set. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>PARSE_OPT_NO_INTERNAL_HELP</tt> </dt> <dd> <p> - By default, parse_options() handles <tt>-h</tt>, <tt>—help</tt> and - <tt>—help-all</tt> internally, by showing a help screen. This option + By default, parse_options() handles <tt>-h</tt>, <tt>--help</tt> and + <tt>--help-all</tt> internally, by showing a help screen. This option turns it off and allows one to add custom handlers for these options, or to just leave them unknown. </p> @@ -484,11 +561,11 @@ </div> <h2 id="_data_structure">Data Structure</h2> <div class="sectionbody"> -<div class="para"><p>The main data structure is an array of the <tt>option</tt> struct, +<div class="paragraph"><p>The main data structure is an array of the <tt>option</tt> struct, say <tt>static struct option builtin_add_options[]</tt>. There are some macros to easily define options:</p></div> -<div class="vlist"><dl> -<dt> +<div class="dlist"><dl> +<dt class="hdlist1"> <tt>OPT__ABBREV(&int_var)</tt> </dt> <dd> @@ -496,39 +573,47 @@ Add <tt>--abbrev[=<n>]</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT__COLOR(&int_var, description)</tt> </dt> <dd> <p> - Add <tt>--color[=<when>]</tt> and <tt>—no-color</tt>. + Add <tt>--color[=<when>]</tt> and <tt>--no-color</tt>. </p> </dd> -<dt> -<tt>OPT__DRY_RUN(&int_var)</tt> +<dt class="hdlist1"> +<tt>OPT__DRY_RUN(&int_var, description)</tt> </dt> <dd> <p> Add <tt>-n, --dry-run</tt>. </p> </dd> -<dt> -<tt>OPT__QUIET(&int_var)</tt> +<dt class="hdlist1"> +<tt>OPT__FORCE(&int_var, description)</tt> +</dt> +<dd> +<p> + Add <tt>-f, --force</tt>. +</p> +</dd> +<dt class="hdlist1"> +<tt>OPT__QUIET(&int_var, description)</tt> </dt> <dd> <p> Add <tt>-q, --quiet</tt>. </p> </dd> -<dt> -<tt>OPT__VERBOSE(&int_var)</tt> +<dt class="hdlist1"> +<tt>OPT__VERBOSE(&int_var, description)</tt> </dt> <dd> <p> Add <tt>-v, --verbose</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_GROUP(description)</tt> </dt> <dd> @@ -538,7 +623,7 @@ Start the description with an upper-case letter. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_BOOLEAN(short, long, &int_var, description)</tt> </dt> <dd> @@ -547,7 +632,7 @@ <tt>int_var</tt> is incremented on each use. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_BIT(short, long, &int_var, description, mask)</tt> </dt> <dd> @@ -556,7 +641,7 @@ If used, <tt>int_var</tt> is bitwise-ored with <tt>mask</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_NEGBIT(short, long, &int_var, description, mask)</tt> </dt> <dd> @@ -565,7 +650,7 @@ If used, <tt>int_var</tt> is bitwise-anded with the inverted <tt>mask</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_SET_INT(short, long, &int_var, description, integer)</tt> </dt> <dd> @@ -574,7 +659,7 @@ If used, set <tt>int_var</tt> to <tt>integer</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_SET_PTR(short, long, &ptr_var, description, ptr)</tt> </dt> <dd> @@ -583,7 +668,7 @@ If used, set <tt>ptr_var</tt> to <tt>ptr</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_STRING(short, long, &str_var, arg_str, description)</tt> </dt> <dd> @@ -592,7 +677,7 @@ The string argument is put into <tt>str_var</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_INTEGER(short, long, &int_var, description)</tt> </dt> <dd> @@ -601,7 +686,7 @@ The integer is put into <tt>int_var</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_DATE(short, long, &int_var, description)</tt> </dt> <dd> @@ -610,7 +695,7 @@ The timestamp is put into <tt>int_var</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_CALLBACK(short, long, &var, arg_str, description, func_ptr)</tt> </dt> <dd> @@ -621,7 +706,7 @@ See <em>Option Callbacks</em> below for a more elaborate description. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_FILENAME(short, long, &var, description)</tt> </dt> <dd> @@ -631,7 +716,7 @@ the prefix argument of <tt>parse_options()</tt> to <tt>prefix_filename()</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_ARGUMENT(long, description)</tt> </dt> <dd> @@ -639,7 +724,7 @@ Introduce a long-option argument that will be kept in <tt>argv[]</tt>. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_NUMBER_CALLBACK(&var, description, func_ptr)</tt> </dt> <dd> @@ -652,24 +737,24 @@ precedence over it. </p> </dd> -<dt> +<dt class="hdlist1"> <tt>OPT_COLOR_FLAG(short, long, &int_var, description)</tt> </dt> <dd> <p> Introduce an option that takes an optional argument that can have one of three values: "always", "never", or "auto". If the - argument is not given, it defaults to "always". The <tt>—no-</tt> form - works like <tt>—long=never</tt>; it cannot take an argument. If + argument is not given, it defaults to "always". The <tt>--no-</tt> form + works like <tt>--long=never</tt>; it cannot take an argument. If "always", set <tt>int_var</tt> to 1; if "never", set <tt>int_var</tt> to 0; if "auto", set <tt>int_var</tt> to 1 if stdout is a tty or a pager, 0 otherwise. </p> </dd> </dl></div> -<div class="para"><p>The last element of the array must be <tt>OPT_END()</tt>.</p></div> -<div class="para"><p>If not stated otherwise, interpret the arguments as follows:</p></div> -<div class="ilist"><ul> +<div class="paragraph"><p>The last element of the array must be <tt>OPT_END()</tt>.</p></div> +<div class="paragraph"><p>If not stated otherwise, interpret the arguments as follows:</p></div> +<div class="ulist"><ul> <li> <p> <tt>short</tt> is a character for the short option @@ -710,20 +795,20 @@ </div> <h2 id="_option_callbacks">Option Callbacks</h2> <div class="sectionbody"> -<div class="para"><p>The function must be defined in this form:</p></div> +<div class="paragraph"><p>The function must be defined in this form:</p></div> <div class="literalblock"> <div class="content"> <pre><tt>int func(const struct option *opt, const char *arg, int unset)</tt></pre> </div></div> -<div class="para"><p>The callback mechanism is as follows:</p></div> -<div class="ilist"><ul> +<div class="paragraph"><p>The callback mechanism is as follows:</p></div> +<div class="ulist"><ul> <li> <p> Inside <tt>func</tt>, the only interesting member of the structure - given by <tt>opt</tt> is the void pointer <tt>opt\->value</tt>. - <tt>*opt\->value</tt> will be the value that is saved into <tt>var</tt>, if you + given by <tt>opt</tt> is the void pointer <tt>opt->value</tt>. + <tt>*opt->value</tt> will be the value that is saved into <tt>var</tt>, if you use <tt>OPT_CALLBACK()</tt>. - For example, do <tt>*(unsigned long *)opt\->value = 42;</tt> to get 42 + For example, do <tt>*(unsigned long *)opt->value = 42;</tt> to get 42 into an <tt>unsigned long</tt> variable. </p> </li> @@ -742,16 +827,16 @@ </div> <h2 id="_sophisticated_option_parsing">Sophisticated option parsing</h2> <div class="sectionbody"> -<div class="para"><p>If you need, for example, option callbacks with optional arguments +<div class="paragraph"><p>If you need, for example, option callbacks with optional arguments or without arguments at all, or if you need other special cases, that are not handled by the macros above, you need to specify the members of the <tt>option</tt> structure manually.</p></div> -<div class="para"><p>This is not covered in this document, but well documented +<div class="paragraph"><p>This is not covered in this document, but well documented in <tt>parse-options.h</tt> itself.</p></div> </div> <h2 id="_examples">Examples</h2> <div class="sectionbody"> -<div class="para"><p>See <tt>test-parse-options.c</tt> and +<div class="paragraph"><p>See <tt>test-parse-options.c</tt> and <tt>builtin-add.c</tt>, <tt>builtin-clone.c</tt>, <tt>builtin-commit.c</tt>, @@ -762,7 +847,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 2010-09-18 23:57:13 UTC +Last updated 2010-11-25 03:13:43 UTC </div> </div> </body>
diff --git a/technical/api-parse-options.txt b/technical/api-parse-options.txt index c5d141c..f6a4a36 100644 --- a/technical/api-parse-options.txt +++ b/technical/api-parse-options.txt
@@ -118,13 +118,16 @@ `OPT__COLOR(&int_var, description)`:: Add `\--color[=<when>]` and `--no-color`. -`OPT__DRY_RUN(&int_var)`:: +`OPT__DRY_RUN(&int_var, description)`:: Add `-n, \--dry-run`. -`OPT__QUIET(&int_var)`:: +`OPT__FORCE(&int_var, description)`:: + Add `-f, \--force`. + +`OPT__QUIET(&int_var, description)`:: Add `-q, \--quiet`. -`OPT__VERBOSE(&int_var)`:: +`OPT__VERBOSE(&int_var, description)`:: Add `-v, \--verbose`. `OPT_GROUP(description)`::
diff --git a/user-manual.html b/user-manual.html index af095bb..c9c5df2 100644 --- a/user-manual.html +++ b/user-manual.html
@@ -1,5 +1,5 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git User’s Manual (for version 1.5.3 or newer)</title><link rel="stylesheet" href="docbook-xsl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book" title="Git User’s Manual (for version 1.5.3 or newer)"><div class="titlepage"><div><div><h1 class="title"><a name="id404896"></a>Git User’s Manual (for version 1.5.3 or newer)</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#id404822"></a></span></dt><dt><span class="chapter"><a href="#repositories-and-branches">1. Repositories and Branches</a></span></dt><dd><dl><dt><span class="section"><a href="#how-to-get-a-git-repository">How to get a git repository</a></span></dt><dt><span class="section"><a href="#how-to-check-out">How to check out a different version of a project</a></span></dt><dt><span class="section"><a href="#understanding-commits">Understanding History: Commits</a></span></dt><dd><dl><dt><span class="section"><a href="#understanding-reachability">Understanding history: commits, parents, and reachability</a></span></dt><dt><span class="section"><a href="#history-diagrams">Understanding history: History diagrams</a></span></dt><dt><span class="section"><a href="#what-is-a-branch">Understanding history: What is a branch?</a></span></dt></dl></dd><dt><span class="section"><a href="#manipulating-branches">Manipulating branches</a></span></dt><dt><span class="section"><a href="#detached-head">Examining an old version without creating a new branch</a></span></dt><dt><span class="section"><a href="#examining-remote-branches">Examining branches from a remote repository</a></span></dt><dt><span class="section"><a href="#how-git-stores-references">Naming branches, tags, and other references</a></span></dt><dt><span class="section"><a href="#Updating-a-repository-With-git-fetch">Updating a repository with git fetch</a></span></dt><dt><span class="section"><a href="#fetching-branches">Fetching branches from other repositories</a></span></dt></dl></dd><dt><span class="chapter"><a href="#exploring-git-history">2. Exploring git history</a></span></dt><dd><dl><dt><span class="section"><a href="#using-bisect">How to use bisect to find a regression</a></span></dt><dt><span class="section"><a href="#naming-commits">Naming commits</a></span></dt><dt><span class="section"><a href="#creating-tags">Creating tags</a></span></dt><dt><span class="section"><a href="#browsing-revisions">Browsing revisions</a></span></dt><dt><span class="section"><a href="#generating-diffs">Generating diffs</a></span></dt><dt><span class="section"><a href="#viewing-old-file-versions">Viewing old file versions</a></span></dt><dt><span class="section"><a href="#history-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#counting-commits-on-a-branch">Counting the number of commits on a branch</a></span></dt><dt><span class="section"><a href="#checking-for-equal-branches">Check whether two branches point at the same history</a></span></dt><dt><span class="section"><a href="#finding-tagged-descendants">Find first tagged version including a given fix</a></span></dt><dt><span class="section"><a href="#showing-commits-unique-to-a-branch">Showing commits unique to a given branch</a></span></dt><dt><span class="section"><a href="#making-a-release">Creating a changelog and tarball for a software release</a></span></dt><dt><span class="section"><a href="#Finding-commits-With-given-Content">Finding commits referencing a file with given content</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#Developing-With-git">3. Developing with git</a></span></dt><dd><dl><dt><span class="section"><a href="#telling-git-your-name">Telling git your name</a></span></dt><dt><span class="section"><a href="#creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#how-to-make-a-commit">How to make a commit</a></span></dt><dt><span class="section"><a href="#creating-good-commit-messages">Creating good commit messages</a></span></dt><dt><span class="section"><a href="#ignoring-files">Ignoring files</a></span></dt><dt><span class="section"><a href="#how-to-merge">How to merge</a></span></dt><dt><span class="section"><a href="#resolving-a-merge">Resolving a merge</a></span></dt><dd><dl><dt><span class="section"><a href="#conflict-resolution">Getting conflict-resolution help during a merge</a></span></dt></dl></dd><dt><span class="section"><a href="#undoing-a-merge">Undoing a merge</a></span></dt><dt><span class="section"><a href="#fast-forwards">Fast-forward merges</a></span></dt><dt><span class="section"><a href="#fixing-mistakes">Fixing mistakes</a></span></dt><dd><dl><dt><span class="section"><a href="#reverting-a-commit">Fixing a mistake with a new commit</a></span></dt><dt><span class="section"><a href="#fixing-a-mistake-by-rewriting-history">Fixing a mistake by rewriting history</a></span></dt><dt><span class="section"><a href="#checkout-of-path">Checking out an old version of a file</a></span></dt><dt><span class="section"><a href="#interrupted-work">Temporarily setting aside work in progress</a></span></dt></dl></dd><dt><span class="section"><a href="#ensuring-good-performance">Ensuring good performance</a></span></dt><dt><span class="section"><a href="#ensuring-reliability">Ensuring reliability</a></span></dt><dd><dl><dt><span class="section"><a href="#checking-for-corruption">Checking the repository for corruption</a></span></dt><dt><span class="section"><a href="#recovering-lost-changes">Recovering lost changes</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#sharing-development">4. Sharing development with others</a></span></dt><dd><dl><dt><span class="section"><a href="#getting-updates-With-git-pull">Getting updates with git pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public git repositories</a></span></dt><dd><dl><dt><span class="section"><a href="#setting-up-a-public-repository">Setting up a public repository</a></span></dt><dt><span class="section"><a href="#exporting-via-git">Exporting a git repository via the git protocol</a></span></dt><dt><span class="section"><a href="#exporting-via-http">Exporting a git repository via http</a></span></dt><dt><span class="section"><a href="#pushing-changes-to-a-public-repository">Pushing changes to a public repository</a></span></dt><dt><span class="section"><a href="#forcing-push">What to do when a push fails</a></span></dt><dt><span class="section"><a href="#setting-up-a-shared-repository">Setting up a shared repository</a></span></dt><dt><span class="section"><a href="#setting-up-gitweb">Allowing web browsing of a repository</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#maintaining-topic-branches">Maintaining topic branches for a Linux subsystem maintainer</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#cleaning-up-history">5. Rewriting history and maintaining patch series</a></span></dt><dd><dl><dt><span class="section"><a href="#patch-series">Creating the perfect patch series</a></span></dt><dt><span class="section"><a href="#using-git-rebase">Keeping a patch series up to date using git rebase</a></span></dt><dt><span class="section"><a href="#rewriting-one-commit">Rewriting a single commit</a></span></dt><dt><span class="section"><a href="#reordering-patch-series">Reordering or selecting from a patch series</a></span></dt><dt><span class="section"><a href="#patch-series-tools">Other tools</a></span></dt><dt><span class="section"><a href="#problems-With-rewriting-history">Problems with rewriting history</a></span></dt><dt><span class="section"><a href="#bisect-merges">Why bisecting merge commits can be harder than bisecting linear history</a></span></dt></dl></dd><dt><span class="chapter"><a href="#advanced-branch-management">6. Advanced branch management</a></span></dt><dd><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote branches</a></span></dt></dl></dd><dt><span class="chapter"><a href="#git-concepts">7. Git concepts</a></span></dt><dd><dl><dt><span class="section"><a href="#the-object-database">The Object Database</a></span></dt><dd><dl><dt><span class="section"><a href="#commit-object">Commit Object</a></span></dt><dt><span class="section"><a href="#tree-object">Tree Object</a></span></dt><dt><span class="section"><a href="#blob-object">Blob Object</a></span></dt><dt><span class="section"><a href="#trust">Trust</a></span></dt><dt><span class="section"><a href="#tag-object">Tag Object</a></span></dt><dt><span class="section"><a href="#pack-files">How git stores objects efficiently: pack files</a></span></dt><dt><span class="section"><a href="#dangling-objects">Dangling objects</a></span></dt><dt><span class="section"><a href="#recovering-from-repository-corruption">Recovering from repository corruption</a></span></dt></dl></dd><dt><span class="section"><a href="#the-index">The index</a></span></dt></dl></dd><dt><span class="chapter"><a href="#submodules">8. Submodules</a></span></dt><dd><dl><dt><span class="section"><a href="#_pitfalls_with_submodules">Pitfalls with submodules</a></span></dt></dl></dd><dt><span class="chapter"><a href="#low-level-operations">9. Low-level git operations</a></span></dt><dd><dl><dt><span class="section"><a href="#object-manipulation">Object access and manipulation</a></span></dt><dt><span class="section"><a href="#the-workflow">The Workflow</a></span></dt><dd><dl><dt><span class="section"><a href="#working-directory-to-index">working directory → index</a></span></dt><dt><span class="section"><a href="#index-to-object-database">index → object database</a></span></dt><dt><span class="section"><a href="#object-database-to-index">object database → index</a></span></dt><dt><span class="section"><a href="#index-to-working-directory">index → working directory</a></span></dt><dt><span class="section"><a href="#tying-it-all-together">Tying it all together</a></span></dt></dl></dd><dt><span class="section"><a href="#examining-the-data">Examining the data</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees">Merging multiple trees</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees-2">Merging multiple trees, continued</a></span></dt></dl></dd><dt><span class="chapter"><a href="#hacking-git">10. Hacking git</a></span></dt><dd><dl><dt><span class="section"><a href="#object-details">Object storage format</a></span></dt><dt><span class="section"><a href="#birdview-on-the-source-code">A birds-eye view of Git’s source code</a></span></dt></dl></dd><dt><span class="chapter"><a href="#glossary">11. Git Glossary</a></span></dt><dt><span class="appendix"><a href="#git-quick-start">A. Git Quick Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#quick-creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#managing-branches">Managing branches</a></span></dt><dt><span class="section"><a href="#exploring-history">Exploring history</a></span></dt><dt><span class="section"><a href="#making-changes">Making changes</a></span></dt><dt><span class="section"><a href="#merging">Merging</a></span></dt><dt><span class="section"><a href="#sharing-your-changes">Sharing your changes</a></span></dt><dt><span class="section"><a href="#repository-maintenance">Repository maintenance</a></span></dt></dl></dd><dt><span class="appendix"><a href="#todo">B. Notes and todo list for this manual</a></span></dt></dl></div><div class="preface"><div class="titlepage"><div><div><h2 class="title"><a name="id404822"></a></h2></div></div></div><p>Git is a fast distributed revision control system.</p><p>This manual is designed to be readable by someone with basic UNIX +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git User’s Manual (for version 1.5.3 or newer)</title><link rel="stylesheet" href="docbook-xsl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book" title="Git User’s Manual (for version 1.5.3 or newer)"><div class="titlepage"><div><div><h1 class="title"><a name="id456198"></a>Git User’s Manual (for version 1.5.3 or newer)</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#id456124"></a></span></dt><dt><span class="chapter"><a href="#repositories-and-branches">1. Repositories and Branches</a></span></dt><dd><dl><dt><span class="section"><a href="#how-to-get-a-git-repository">How to get a git repository</a></span></dt><dt><span class="section"><a href="#how-to-check-out">How to check out a different version of a project</a></span></dt><dt><span class="section"><a href="#understanding-commits">Understanding History: Commits</a></span></dt><dd><dl><dt><span class="section"><a href="#understanding-reachability">Understanding history: commits, parents, and reachability</a></span></dt><dt><span class="section"><a href="#history-diagrams">Understanding history: History diagrams</a></span></dt><dt><span class="section"><a href="#what-is-a-branch">Understanding history: What is a branch?</a></span></dt></dl></dd><dt><span class="section"><a href="#manipulating-branches">Manipulating branches</a></span></dt><dt><span class="section"><a href="#detached-head">Examining an old version without creating a new branch</a></span></dt><dt><span class="section"><a href="#examining-remote-branches">Examining branches from a remote repository</a></span></dt><dt><span class="section"><a href="#how-git-stores-references">Naming branches, tags, and other references</a></span></dt><dt><span class="section"><a href="#Updating-a-repository-With-git-fetch">Updating a repository with git fetch</a></span></dt><dt><span class="section"><a href="#fetching-branches">Fetching branches from other repositories</a></span></dt></dl></dd><dt><span class="chapter"><a href="#exploring-git-history">2. Exploring git history</a></span></dt><dd><dl><dt><span class="section"><a href="#using-bisect">How to use bisect to find a regression</a></span></dt><dt><span class="section"><a href="#naming-commits">Naming commits</a></span></dt><dt><span class="section"><a href="#creating-tags">Creating tags</a></span></dt><dt><span class="section"><a href="#browsing-revisions">Browsing revisions</a></span></dt><dt><span class="section"><a href="#generating-diffs">Generating diffs</a></span></dt><dt><span class="section"><a href="#viewing-old-file-versions">Viewing old file versions</a></span></dt><dt><span class="section"><a href="#history-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#counting-commits-on-a-branch">Counting the number of commits on a branch</a></span></dt><dt><span class="section"><a href="#checking-for-equal-branches">Check whether two branches point at the same history</a></span></dt><dt><span class="section"><a href="#finding-tagged-descendants">Find first tagged version including a given fix</a></span></dt><dt><span class="section"><a href="#showing-commits-unique-to-a-branch">Showing commits unique to a given branch</a></span></dt><dt><span class="section"><a href="#making-a-release">Creating a changelog and tarball for a software release</a></span></dt><dt><span class="section"><a href="#Finding-commits-With-given-Content">Finding commits referencing a file with given content</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#Developing-With-git">3. Developing with git</a></span></dt><dd><dl><dt><span class="section"><a href="#telling-git-your-name">Telling git your name</a></span></dt><dt><span class="section"><a href="#creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#how-to-make-a-commit">How to make a commit</a></span></dt><dt><span class="section"><a href="#creating-good-commit-messages">Creating good commit messages</a></span></dt><dt><span class="section"><a href="#ignoring-files">Ignoring files</a></span></dt><dt><span class="section"><a href="#how-to-merge">How to merge</a></span></dt><dt><span class="section"><a href="#resolving-a-merge">Resolving a merge</a></span></dt><dd><dl><dt><span class="section"><a href="#conflict-resolution">Getting conflict-resolution help during a merge</a></span></dt></dl></dd><dt><span class="section"><a href="#undoing-a-merge">Undoing a merge</a></span></dt><dt><span class="section"><a href="#fast-forwards">Fast-forward merges</a></span></dt><dt><span class="section"><a href="#fixing-mistakes">Fixing mistakes</a></span></dt><dd><dl><dt><span class="section"><a href="#reverting-a-commit">Fixing a mistake with a new commit</a></span></dt><dt><span class="section"><a href="#fixing-a-mistake-by-rewriting-history">Fixing a mistake by rewriting history</a></span></dt><dt><span class="section"><a href="#checkout-of-path">Checking out an old version of a file</a></span></dt><dt><span class="section"><a href="#interrupted-work">Temporarily setting aside work in progress</a></span></dt></dl></dd><dt><span class="section"><a href="#ensuring-good-performance">Ensuring good performance</a></span></dt><dt><span class="section"><a href="#ensuring-reliability">Ensuring reliability</a></span></dt><dd><dl><dt><span class="section"><a href="#checking-for-corruption">Checking the repository for corruption</a></span></dt><dt><span class="section"><a href="#recovering-lost-changes">Recovering lost changes</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#sharing-development">4. Sharing development with others</a></span></dt><dd><dl><dt><span class="section"><a href="#getting-updates-With-git-pull">Getting updates with git pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public git repositories</a></span></dt><dd><dl><dt><span class="section"><a href="#setting-up-a-public-repository">Setting up a public repository</a></span></dt><dt><span class="section"><a href="#exporting-via-git">Exporting a git repository via the git protocol</a></span></dt><dt><span class="section"><a href="#exporting-via-http">Exporting a git repository via http</a></span></dt><dt><span class="section"><a href="#pushing-changes-to-a-public-repository">Pushing changes to a public repository</a></span></dt><dt><span class="section"><a href="#forcing-push">What to do when a push fails</a></span></dt><dt><span class="section"><a href="#setting-up-a-shared-repository">Setting up a shared repository</a></span></dt><dt><span class="section"><a href="#setting-up-gitweb">Allowing web browsing of a repository</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#maintaining-topic-branches">Maintaining topic branches for a Linux subsystem maintainer</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#cleaning-up-history">5. Rewriting history and maintaining patch series</a></span></dt><dd><dl><dt><span class="section"><a href="#patch-series">Creating the perfect patch series</a></span></dt><dt><span class="section"><a href="#using-git-rebase">Keeping a patch series up to date using git rebase</a></span></dt><dt><span class="section"><a href="#rewriting-one-commit">Rewriting a single commit</a></span></dt><dt><span class="section"><a href="#reordering-patch-series">Reordering or selecting from a patch series</a></span></dt><dt><span class="section"><a href="#patch-series-tools">Other tools</a></span></dt><dt><span class="section"><a href="#problems-With-rewriting-history">Problems with rewriting history</a></span></dt><dt><span class="section"><a href="#bisect-merges">Why bisecting merge commits can be harder than bisecting linear history</a></span></dt></dl></dd><dt><span class="chapter"><a href="#advanced-branch-management">6. Advanced branch management</a></span></dt><dd><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote-tracking branches</a></span></dt></dl></dd><dt><span class="chapter"><a href="#git-concepts">7. Git concepts</a></span></dt><dd><dl><dt><span class="section"><a href="#the-object-database">The Object Database</a></span></dt><dd><dl><dt><span class="section"><a href="#commit-object">Commit Object</a></span></dt><dt><span class="section"><a href="#tree-object">Tree Object</a></span></dt><dt><span class="section"><a href="#blob-object">Blob Object</a></span></dt><dt><span class="section"><a href="#trust">Trust</a></span></dt><dt><span class="section"><a href="#tag-object">Tag Object</a></span></dt><dt><span class="section"><a href="#pack-files">How git stores objects efficiently: pack files</a></span></dt><dt><span class="section"><a href="#dangling-objects">Dangling objects</a></span></dt><dt><span class="section"><a href="#recovering-from-repository-corruption">Recovering from repository corruption</a></span></dt></dl></dd><dt><span class="section"><a href="#the-index">The index</a></span></dt></dl></dd><dt><span class="chapter"><a href="#submodules">8. Submodules</a></span></dt><dd><dl><dt><span class="section"><a href="#_pitfalls_with_submodules">Pitfalls with submodules</a></span></dt></dl></dd><dt><span class="chapter"><a href="#low-level-operations">9. Low-level git operations</a></span></dt><dd><dl><dt><span class="section"><a href="#object-manipulation">Object access and manipulation</a></span></dt><dt><span class="section"><a href="#the-workflow">The Workflow</a></span></dt><dd><dl><dt><span class="section"><a href="#working-directory-to-index">working directory → index</a></span></dt><dt><span class="section"><a href="#index-to-object-database">index → object database</a></span></dt><dt><span class="section"><a href="#object-database-to-index">object database → index</a></span></dt><dt><span class="section"><a href="#index-to-working-directory">index → working directory</a></span></dt><dt><span class="section"><a href="#tying-it-all-together">Tying it all together</a></span></dt></dl></dd><dt><span class="section"><a href="#examining-the-data">Examining the data</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees">Merging multiple trees</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees-2">Merging multiple trees, continued</a></span></dt></dl></dd><dt><span class="chapter"><a href="#hacking-git">10. Hacking git</a></span></dt><dd><dl><dt><span class="section"><a href="#object-details">Object storage format</a></span></dt><dt><span class="section"><a href="#birdview-on-the-source-code">A birds-eye view of Git’s source code</a></span></dt></dl></dd><dt><span class="chapter"><a href="#glossary">11. Git Glossary</a></span></dt><dt><span class="appendix"><a href="#git-quick-start">A. Git Quick Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#quick-creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#managing-branches">Managing branches</a></span></dt><dt><span class="section"><a href="#exploring-history">Exploring history</a></span></dt><dt><span class="section"><a href="#making-changes">Making changes</a></span></dt><dt><span class="section"><a href="#merging">Merging</a></span></dt><dt><span class="section"><a href="#sharing-your-changes">Sharing your changes</a></span></dt><dt><span class="section"><a href="#repository-maintenance">Repository maintenance</a></span></dt></dl></dd><dt><span class="appendix"><a href="#todo">B. Notes and todo list for this manual</a></span></dt></dl></div><div class="preface"><div class="titlepage"><div><div><h2 class="title"><a name="id456124"></a></h2></div></div></div><p>Git is a fast distributed revision control system.</p><p>This manual is designed to be readable by someone with basic UNIX command-line skills, but no previous knowledge of git.</p><p><a class="xref" href="#repositories-and-branches" title="Chapter 1. Repositories and Branches">Chapter 1, <i>Repositories and Branches</i></a> and <a class="xref" href="#exploring-git-history" title="Chapter 2. Exploring git history">Chapter 2, <i>Exploring git history</i></a> explain how to fetch and study a project using git—read these chapters to learn how to build and test a particular version of a software project, search for @@ -176,7 +176,8 @@ (or tag) for this version later if you decide to.</p></div><div class="section" title="Examining branches from a remote repository"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="examining-remote-branches"></a>Examining branches from a remote repository</h2></div></div></div><p>The "master" branch that was created at the time you cloned is a copy of the HEAD in the repository that you cloned from. That repository may also have had other branches, though, and your local repository -keeps branches which track each of those remote branches, which you +keeps branches which track each of those remote branches, called +remote-tracking branches, which you can view using the "-r" option to <a class="ulink" href="git-branch.html" target="_top">git-branch(1)</a>:</p><div class="literallayout"><p>$ git branch -r<br> origin/HEAD<br> origin/html<br> @@ -185,8 +186,14 @@ origin/master<br> origin/next<br> origin/pu<br> - origin/todo</p></div><p>You cannot check out these remote-tracking branches, but you can -examine them on a branch of your own, just as you would a tag:</p><div class="literallayout"><p>$ git checkout -b my-todo-copy origin/todo</p></div><p>Note that the name "origin" is just the name that git uses by default + origin/todo</p></div><p>In this example, "origin" is called a remote repository, or "remote" +for short. The branches of this repository are called "remote +branches" from our point of view. The remote-tracking branches listed +above were created based on the remote branches at clone time and will +be updated by "git fetch" (hence "git pull") and "git push". See +<a class="xref" href="#Updating-a-repository-With-git-fetch" title="Updating a repository with git fetch">the section called “Updating a repository with git fetch”</a> for details.</p><p>You might want to build on one of these remote-tracking branches +on a branch of your own, just as you would for a tag:</p><div class="literallayout"><p>$ git checkout -b my-todo-copy origin/todo</p></div><p>You can also check out "origin/todo" directly to examine it or +write a one-off patch. See <a class="link" href="#detached-head" title="Examining an old version without creating a new branch">detached head</a>.</p><p>Note that the name "origin" is just the name that git uses by default to refer to the repository that you cloned from.</p></div><div class="section" title="Naming branches, tags, and other references"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="how-git-stores-references"></a>Naming branches, tags, and other references</h2></div></div></div><p>Branches, remote-tracking branches, and tags are all references to commits. All references are named with a slash-separated path name starting with "refs"; the names we’ve been using so far are actually @@ -217,7 +224,7 @@ commit: bf81b46</p></div><p>New remote-tracking branches will be stored under the shorthand name that you gave "git remote add", in this case linux-nfs:</p><div class="literallayout"><p>$ git branch -r<br> linux-nfs/master<br> -origin/master</p></div><p>If you run "git fetch <remote>" later, the tracking branches for the +origin/master</p></div><p>If you run "git fetch <remote>" later, the remote-tracking branches for the named <remote> will be updated.</p><p>If you examine the file .git/config, you will see that git has added a new stanza:</p><div class="literallayout"><p>$ cat .git/config<br> ...<br> @@ -670,13 +677,17 @@ reference pointing to it, for example, a new branch:</p><div class="literallayout"><p>$ git branch recovered-branch 7281251ddd</p></div><p>Other types of dangling objects (blobs and trees) are also possible, and dangling objects can arise in other situations.</p></div></div></div></div><div class="chapter" title="Chapter 4. Sharing development with others"><div class="titlepage"><div><div><h2 class="title"><a name="sharing-development"></a>Chapter 4. Sharing development with others</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#getting-updates-With-git-pull">Getting updates with git pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public git repositories</a></span></dt><dd><dl><dt><span class="section"><a href="#setting-up-a-public-repository">Setting up a public repository</a></span></dt><dt><span class="section"><a href="#exporting-via-git">Exporting a git repository via the git protocol</a></span></dt><dt><span class="section"><a href="#exporting-via-http">Exporting a git repository via http</a></span></dt><dt><span class="section"><a href="#pushing-changes-to-a-public-repository">Pushing changes to a public repository</a></span></dt><dt><span class="section"><a href="#forcing-push">What to do when a push fails</a></span></dt><dt><span class="section"><a href="#setting-up-a-shared-repository">Setting up a shared repository</a></span></dt><dt><span class="section"><a href="#setting-up-gitweb">Allowing web browsing of a repository</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#maintaining-topic-branches">Maintaining topic branches for a Linux subsystem maintainer</a></span></dt></dl></dd></dl></div><div class="section" title="Getting updates with git pull"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="getting-updates-With-git-pull"></a>Getting updates with git pull</h2></div></div></div><p>After you clone a repository and commit a few changes of your own, you may wish to check the original repository for updates and merge them -into your own work.</p><p>We have already seen <a class="link" href="#Updating-a-repository-With-git-fetch" title="Updating a repository with git fetch">how to keep remote tracking branches up to date</a> with <a class="ulink" href="git-fetch.html" target="_top">git-fetch(1)</a>, +into your own work.</p><p>We have already seen <a class="link" href="#Updating-a-repository-With-git-fetch" title="Updating a repository with git fetch">how to keep remote-tracking branches up to date</a> with <a class="ulink" href="git-fetch.html" target="_top">git-fetch(1)</a>, and how to merge two branches. So you can merge in changes from the original repository’s master branch with:</p><div class="literallayout"><p>$ git fetch<br> $ git merge origin/master</p></div><p>However, the <a class="ulink" href="git-pull.html" target="_top">git-pull(1)</a> command provides a way to do this in -one step:</p><div class="literallayout"><p>$ git pull origin master</p></div><p>In fact, if you have "master" checked out, then by default "git pull" -merges from the HEAD branch of the origin repository. So often you can -accomplish the above with just a simple</p><div class="literallayout"><p>$ git pull</p></div><p>More generally, a branch that is created from a remote branch will pull +one step:</p><div class="literallayout"><p>$ git pull origin master</p></div><p>In fact, if you have "master" checked out, then this branch has been +configured by "git clone" to get changes from the HEAD branch of the +origin repository. So often you can +accomplish the above with just a simple</p><div class="literallayout"><p>$ git pull</p></div><p>This command will fetch changes from the remote branches to your +remote-tracking branches <code class="literal">origin/*</code>, and merge the default branch into +the current branch.</p><p>More generally, a branch that is created from a remote-tracking branch +will pull by default from that branch. See the descriptions of the branch.<name>.remote and branch.<name>.merge options in <a class="ulink" href="git-config.html" target="_top">git-config(1)</a>, and the discussion of the <code class="literal">--track</code> option in @@ -838,7 +849,7 @@ </li></ul></div><p>He also uses a set of temporary branches ("topic branches"), each containing a logical grouping of patches.</p><p>To set this up, first create your work tree by cloning Linus’s public tree:</p><div class="literallayout"><p>$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git work<br> -$ cd work</p></div><p>Linus’s tree will be stored in the remote branch named origin/master, +$ cd work</p></div><p>Linus’s tree will be stored in the remote-tracking branch named origin/master, and can be updated using <a class="ulink" href="git-fetch.html" target="_top">git-fetch(1)</a>; you can track other public trees using <a class="ulink" href="git-remote.html" target="_top">git-remote(1)</a> to set up a "remote" and <a class="ulink" href="git-fetch.html" target="_top">git-fetch(1)</a> to keep them up-to-date; see @@ -1115,7 +1126,7 @@ and understanding why Y* was broken would probably be easier.</p><p>Partly for this reason, many experienced git users, even when working on an otherwise merge-heavy project, keep the history linear by rebasing against the latest upstream version before -publishing.</p></div></div><div class="chapter" title="Chapter 6. Advanced branch management"><div class="titlepage"><div><div><h2 class="title"><a name="advanced-branch-management"></a>Chapter 6. Advanced branch management</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote branches</a></span></dt></dl></div><div class="section" title="Fetching individual branches"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="fetching-individual-branches"></a>Fetching individual branches</h2></div></div></div><p>Instead of using <a class="ulink" href="git-remote.html" target="_top">git-remote(1)</a>, you can also choose just +publishing.</p></div></div><div class="chapter" title="Chapter 6. Advanced branch management"><div class="titlepage"><div><div><h2 class="title"><a name="advanced-branch-management"></a>Chapter 6. Advanced branch management</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote-tracking branches</a></span></dt></dl></div><div class="section" title="Fetching individual branches"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="fetching-individual-branches"></a>Fetching individual branches</h2></div></div></div><p>Instead of using <a class="ulink" href="git-remote.html" target="_top">git-remote(1)</a>, you can also choose just to update one branch at a time, and to store it locally under an arbitrary name:</p><div class="literallayout"><p>$ git fetch origin todo:my-todo-work</p></div><p>The first argument, "origin", just tells git to fetch from the repository you originally cloned from. The second argument tells git @@ -1142,7 +1153,7 @@ them.</p></div><div class="section" title="Forcing git fetch to do non-fast-forward updates"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="forcing-fetch"></a>Forcing git fetch to do non-fast-forward updates</h2></div></div></div><p>If git fetch fails because the new head of a branch is not a descendant of the old head, you may force the update with:</p><div class="literallayout"><p>$ git fetch git://example.com/proj.git +master:refs/remotes/example/master</p></div><p>Note the addition of the "+" sign. Alternatively, you can use the "-f" flag to force updates of all the fetched branches, as in:</p><div class="literallayout"><p>$ git fetch -f origin</p></div><p>Be aware that commits that the old version of example/master pointed at -may be lost, as we saw in the previous section.</p></div><div class="section" title="Configuring remote branches"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="remote-branch-configuration"></a>Configuring remote branches</h2></div></div></div><p>We saw above that "origin" is just a shortcut to refer to the +may be lost, as we saw in the previous section.</p></div><div class="section" title="Configuring remote-tracking branches"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="remote-branch-configuration"></a>Configuring remote-tracking branches</h2></div></div></div><p>We saw above that "origin" is just a shortcut to refer to the repository that you originally cloned from. This information is stored in git configuration variables, which you can see using <a class="ulink" href="git-config.html" target="_top">git-config(1)</a>:</p><div class="literallayout"><p>$ git config -l<br> @@ -2034,7 +2045,7 @@ you have. In such these cases, you do not make a new <a class="link" href="#def_merge">merge</a> <a class="link" href="#def_commit">commit</a> but instead just update to his revision. This will happen frequently on a - <a class="link" href="#def_tracking_branch">tracking branch</a> of a remote + <a class="link" href="#def_remote_tracking_branch">remote-tracking branch</a> of a remote <a class="link" href="#def_repository">repository</a>. </dd><dt><span class="term"> <a name="def_fetch"></a>fetch @@ -2180,7 +2191,7 @@ The default upstream <a class="link" href="#def_repository">repository</a>. Most projects have at least one upstream project which they track. By default <span class="emphasis"><em>origin</em></span> is used for that purpose. New upstream updates - will be fetched into remote <a class="link" href="#def_tracking_branch">tracking branches</a> named + will be fetched into remote <a class="link" href="#def_remote_tracking_branch">remote-tracking branches</a> named origin/name-of-upstream-branch, which you can see using <code class="literal">git branch -r</code>. </dd><dt><span class="term"> @@ -2282,6 +2293,15 @@ master branch head as to-upstream branch at $URL". See also <a class="ulink" href="git-push.html" target="_top">git-push(1)</a>. </dd><dt><span class="term"> +<a name="def_remote_tracking_branch"></a>remote-tracking branch +</span></dt><dd> + A regular git <a class="link" href="#def_branch">branch</a> that is used to follow changes from + another <a class="link" href="#def_repository">repository</a>. A remote-tracking + branch should not contain direct modifications or have local commits + made to it. A remote-tracking branch can usually be + identified as the right-hand-side <a class="link" href="#def_ref">ref</a> in a Pull: + <a class="link" href="#def_refspec">refspec</a>. +</dd><dt><span class="term"> <a name="def_repository"></a>repository </span></dt><dd> A collection of <a class="link" href="#def_ref">refs</a> together with an @@ -2361,15 +2381,6 @@ that each contain very well defined concepts or small incremental yet related changes. </dd><dt><span class="term"> -<a name="def_tracking_branch"></a>tracking branch -</span></dt><dd> - A regular git <a class="link" href="#def_branch">branch</a> that is used to follow changes from - another <a class="link" href="#def_repository">repository</a>. A tracking - branch should not contain direct modifications or have local commits - made to it. A tracking branch can usually be - identified as the right-hand-side <a class="link" href="#def_ref">ref</a> in a Pull: - <a class="link" href="#def_refspec">refspec</a>. -</dd><dt><span class="term"> <a name="def_tree"></a>tree </span></dt><dd> Either a <a class="link" href="#def_working_tree">working tree</a>, or a <a class="link" href="#def_tree_object">tree object</a> together with the dependent <a class="link" href="#def_blob_object">blob</a> and tree objects
diff --git a/user-manual.txt b/user-manual.txt index fc56da6..f13a846 100644 --- a/user-manual.txt +++ b/user-manual.txt
@@ -344,7 +344,8 @@ The "master" branch that was created at the time you cloned is a copy of the HEAD in the repository that you cloned from. That repository may also have had other branches, though, and your local repository -keeps branches which track each of those remote branches, which you +keeps branches which track each of those remote branches, called +remote-tracking branches, which you can view using the "-r" option to linkgit:git-branch[1]: ------------------------------------------------ @@ -359,13 +360,23 @@ origin/todo ------------------------------------------------ -You cannot check out these remote-tracking branches, but you can -examine them on a branch of your own, just as you would a tag: +In this example, "origin" is called a remote repository, or "remote" +for short. The branches of this repository are called "remote +branches" from our point of view. The remote-tracking branches listed +above were created based on the remote branches at clone time and will +be updated by "git fetch" (hence "git pull") and "git push". See +<<Updating-a-repository-With-git-fetch>> for details. + +You might want to build on one of these remote-tracking branches +on a branch of your own, just as you would for a tag: ------------------------------------------------ $ git checkout -b my-todo-copy origin/todo ------------------------------------------------ +You can also check out "origin/todo" directly to examine it or +write a one-off patch. See <<detached-head,detached head>>. + Note that the name "origin" is just the name that git uses by default to refer to the repository that you cloned from. @@ -435,7 +446,7 @@ origin/master ------------------------------------------------- -If you run "git fetch <remote>" later, the tracking branches for the +If you run "git fetch <remote>" later, the remote-tracking branches for the named <remote> will be updated. If you examine the file .git/config, you will see that git has added @@ -1700,7 +1711,7 @@ into your own work. We have already seen <<Updating-a-repository-With-git-fetch,how to -keep remote tracking branches up to date>> with linkgit:git-fetch[1], +keep remote-tracking branches up to date>> with linkgit:git-fetch[1], and how to merge two branches. So you can merge in changes from the original repository's master branch with: @@ -1716,15 +1727,21 @@ $ git pull origin master ------------------------------------------------- -In fact, if you have "master" checked out, then by default "git pull" -merges from the HEAD branch of the origin repository. So often you can +In fact, if you have "master" checked out, then this branch has been +configured by "git clone" to get changes from the HEAD branch of the +origin repository. So often you can accomplish the above with just a simple ------------------------------------------------- $ git pull ------------------------------------------------- -More generally, a branch that is created from a remote branch will pull +This command will fetch changes from the remote branches to your +remote-tracking branches `origin/*`, and merge the default branch into +the current branch. + +More generally, a branch that is created from a remote-tracking branch +will pull by default from that branch. See the descriptions of the branch.<name>.remote and branch.<name>.merge options in linkgit:git-config[1], and the discussion of the `--track` option in @@ -2106,7 +2123,7 @@ $ cd work ------------------------------------------------- -Linus's tree will be stored in the remote branch named origin/master, +Linus's tree will be stored in the remote-tracking branch named origin/master, and can be updated using linkgit:git-fetch[1]; you can track other public trees using linkgit:git-remote[1] to set up a "remote" and linkgit:git-fetch[1] to keep them up-to-date; see @@ -2800,8 +2817,8 @@ may be lost, as we saw in the previous section. [[remote-branch-configuration]] -Configuring remote branches ---------------------------- +Configuring remote-tracking branches +------------------------------------ We saw above that "origin" is just a shortcut to refer to the repository that you originally cloned from. This information is